public function ExampleService::test2 in Coder 8.3.x
Same name and namespace in other branches
- 8.3 tests/DrupalPractice/Objects/drupal8/ExampleService.php \Drupal\testmodule\ExampleService::test2()
- 8.2 coder_sniffer/DrupalPractice/Test/Objects/src/ExampleService.php \Drupal\testmodule\ExampleService::test2()
Loading nodes should be done from an injected service.
File
- tests/
DrupalPractice/ Objects/ drupal8/ ExampleService.php, line 22
Class
- ExampleService
- Some service.
Namespace
Drupal\testmoduleCode
public function test2() {
return Node::load(1);
}