function AutowireTestClass::__construct
Same name and namespace in other branches
- main core/tests/Drupal/Tests/Core/DependencyInjection/AutowiredInstanceTraitTest.php \Drupal\Tests\Core\DependencyInjection\AutowireTestClass::__construct()
File
-
core/
tests/ Drupal/ Tests/ Core/ DependencyInjection/ AutowiredInstanceTraitTest.php, line 114
Class
- AutowireTestClass
- Test class covering service and parameter autowiring scenarios.
Namespace
Drupal\Tests\Core\DependencyInjectionCode
public function __construct(public readonly mixed $configuration, public readonly string $pluginId, public readonly array $pluginDefinition, public readonly \stdClass $serviceByType, #[Autowire(service: 'custom.service')] public readonly \stdClass $serviceById, #[Autowire('@custom.service')] public readonly \stdClass $serviceByShortId, #[Autowire(param: 'array.parameter')] public readonly array $arrayParameter, #[Autowire('%string.parameter%')] public readonly string $stringParameter, #[Autowire('@nullable.service')] public readonly ?object $nullableService = NULL, #[Autowire(param: 'nullable.parameter')] public readonly ?string $nullableParameter = NULL) {
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.