public function ExampleClassWithDependencyInjection::test3 in Coder 8.3.x
Same name and namespace in other branches
- 8.3 tests/DrupalPractice/Objects/drupal8/ExampleClassWithDependencyInjection.php \Drupal\testmodule\ExampleClassWithDependencyInjection::test3()
Global function should not be used, we should use an injected service.
File
- tests/
DrupalPractice/ Objects/ drupal8/ ExampleClassWithDependencyInjection.php, line 30
Class
- ExampleClassWithDependencyInjection
- A class which is not a service but has access to the container.
Namespace
Drupal\testmoduleCode
public function test3() {
return format_date(time());
}