autowire_test.services.yml

Same filename in other branches
  1. 9 core/modules/system/tests/modules/autowire_test/autowire_test.services.yml
  2. 10 core/modules/system/tests/modules/autowire_test/autowire_test.services.yml
core/modules/system/tests/modules/autowire_test/autowire_test.services.yml

File

core/modules/system/tests/modules/autowire_test/autowire_test.services.yml

View source
  1. services:
  2. # Multiple services that implements TestInjectionInterface.
  3. # These are marked private, because they are only intended to be used as
  4. # dependencies injected into other services.
  5. Drupal\autowire_test\TestInjection:
  6. public: false
  7. Drupal\autowire_test\TestInjection2:
  8. public: false
  9. Drupal\autowire_test\TestInjection3:
  10. public: false
  11. # An alias that specifies which service to use by default for arguments that
  12. # type-hint to the interface.
  13. # This is marked private, because it is only intended to be used as a
  14. # dependency injected into other services.
  15. Drupal\autowire_test\TestInjectionInterface:
  16. alias: 'Drupal\autowire_test\TestInjection'
  17. public: false
  18. Drupal\autowire_test\TestInjectionInterface $testInjection3: '@Drupal\autowire_test\TestInjection3'
  19. # A service that tests autowiring for four constructor arguments:
  20. # - One type-hinted to TestInjectionInterface.
  21. # - One type-hinted to TestInjection2.
  22. # - One type-hinted to \Drupal\Core\Database\Connection.
  23. # - One type-hinted to \Symfony\Component\HttpKernel\KernelInterface.
  24. Drupal\autowire_test\TestService:
  25. autowire: true

Services


Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.