More updates to stop using dev or alpha or beta versions.
[yaffs-website] / web / core / tests / Drupal / Tests / Core / Plugin / Discovery / TestContainerDerivativeDiscovery.php
1 <?php
2
3 namespace Drupal\Tests\Core\Plugin\Discovery;
4
5 use Drupal\Core\Plugin\Discovery\ContainerDeriverInterface;
6 use Symfony\Component\DependencyInjection\ContainerInterface;
7 use Symfony\Component\EventDispatcher\EventDispatcherInterface;
8
9 /**
10  * Defines container test derivative discovery.
11  */
12 class TestContainerDerivativeDiscovery extends TestDerivativeDiscovery implements ContainerDeriverInterface {
13
14   /**
15    * Constructs a TestContainerDerivativeDiscovery object.
16    *
17    * @var \Symfony\Component\EventDispatcher\EventDispatcherInterface $example_service
18    *   Some service.
19    */
20   public function __construct(EventDispatcherInterface $example_service) {
21   }
22
23   /**
24    * {@inheritdoc}
25    */
26   public static function create(ContainerInterface $container, $base_plugin_id) {
27     return new static($container->get('example_service'));
28   }
29
30 }