class TestContainerDerivativeDiscovery in Drupal 9
Same name and namespace in other branches
- 8 core/tests/Drupal/Tests/Core/Plugin/Discovery/TestContainerDerivativeDiscovery.php \Drupal\Tests\Core\Plugin\Discovery\TestContainerDerivativeDiscovery
Defines container test derivative discovery.
Hierarchy
- class \Drupal\Tests\Core\Plugin\Discovery\TestDerivativeDiscovery implements DeriverInterface
- class \Drupal\Tests\Core\Plugin\Discovery\TestContainerDerivativeDiscovery implements ContainerDeriverInterface
Expanded class hierarchy of TestContainerDerivativeDiscovery
File
- core/
tests/ Drupal/ Tests/ Core/ Plugin/ Discovery/ TestContainerDerivativeDiscovery.php, line 12
Namespace
Drupal\Tests\Core\Plugin\DiscoveryView source
class TestContainerDerivativeDiscovery extends TestDerivativeDiscovery implements ContainerDeriverInterface {
/**
* Constructs a TestContainerDerivativeDiscovery object.
*
* @var \Symfony\Contracts\EventDispatcher\EventDispatcherInterface $example_service
* Some service.
*/
public function __construct(EventDispatcherInterface $example_service) {
}
/**
* {@inheritdoc}
*/
public static function create(ContainerInterface $container, $base_plugin_id) {
return new static($container
->get('example_service'));
}
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
TestContainerDerivativeDiscovery:: |
public static | function |
Creates a new class instance. Overrides ContainerDeriverInterface:: |
|
TestContainerDerivativeDiscovery:: |
public | function | Constructs a TestContainerDerivativeDiscovery object. | |
TestDerivativeDiscovery:: |
public | function |
Gets the definition of a derivative plugin. Overrides DeriverInterface:: |
|
TestDerivativeDiscovery:: |
public | function |
Gets the definition of all derivatives of a base plugin. Overrides DeriverInterface:: |