public function ExampleClassWithDependencyInjection::test4 in Coder 8.3.x
Same name and namespace in other branches
- 8.3 tests/DrupalPractice/Objects/drupal8/ExampleClassWithDependencyInjection.php \Drupal\testmodule\ExampleClassWithDependencyInjection::test4()
t() should not be used, instead we should use the StringTranslationTrait.
File
- tests/
DrupalPractice/ Objects/ drupal8/ ExampleClassWithDependencyInjection.php, line 37
Class
- ExampleClassWithDependencyInjection
- A class which is not a service but has access to the container.
Namespace
Drupal\testmoduleCode
public function test4() {
return t('Test');
}