class TestService

Same name in this branch
  1. 11.x core/modules/system/tests/modules/decorated_service_test/src/TestService.php \Drupal\decorated_service_test\TestService
  2. 11.x core/modules/system/tests/modules/autowire_test/src/TestService.php \Drupal\autowire_test\TestService
Same name in other branches
  1. 9 core/modules/system/tests/modules/decorated_service_test/src/TestService.php \Drupal\decorated_service_test\TestService
  2. 9 core/modules/system/tests/modules/services_defaults_test/src/TestService.php \Drupal\services_defaults_test\TestService
  3. 9 core/modules/system/tests/modules/autowire_test/src/TestService.php \Drupal\autowire_test\TestService
  4. 10 core/modules/system/tests/modules/decorated_service_test/src/TestService.php \Drupal\decorated_service_test\TestService
  5. 10 core/modules/system/tests/modules/services_defaults_test/src/TestService.php \Drupal\services_defaults_test\TestService
  6. 10 core/modules/system/tests/modules/autowire_test/src/TestService.php \Drupal\autowire_test\TestService

An autowired service to test _defaults.

Hierarchy

Expanded class hierarchy of TestService

1 string reference to 'TestService'
services_defaults_test.services.yml in core/modules/system/tests/modules/services_defaults_test/services_defaults_test.services.yml
core/modules/system/tests/modules/services_defaults_test/services_defaults_test.services.yml
1 service uses TestService
services_default_test.no_autowire in core/modules/system/tests/modules/services_defaults_test/services_defaults_test.services.yml
Drupal\services_defaults_test\TestService

File

core/modules/system/tests/modules/services_defaults_test/src/TestService.php, line 10

Namespace

Drupal\services_defaults_test
View source
class TestService {
    
    /**
     * @var \Drupal\services_defaults_test\TestInjectionInterface
     */
    protected $testInjection;
    
    /**
     * @var \Drupal\services_defaults_test\TestInjection2
     */
    protected $testInjection2;
    public function __construct(TestInjectionInterface $test_injection, TestInjection2 $test_injection2) {
        $this->testInjection = $test_injection;
        $this->testInjection2 = $test_injection2;
    }
    public function getTestInjection() {
        return $this->testInjection;
    }
    public function getTestInjection2() {
        return $this->testInjection2;
    }

}

Members

Title Sort descending Modifiers Object type Summary
TestService::$testInjection protected property
TestService::$testInjection2 protected property
TestService::getTestInjection public function
TestService::getTestInjection2 public function
TestService::__construct public function

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