function TestControllers::testEntityLanguage
Same name in other branches
- 8.9.x core/modules/system/tests/modules/paramconverter_test/src/TestControllers.php \Drupal\paramconverter_test\TestControllers::testEntityLanguage()
- 10 core/modules/system/tests/modules/paramconverter_test/src/TestControllers.php \Drupal\paramconverter_test\TestControllers::testEntityLanguage()
- 11.x core/modules/system/tests/modules/paramconverter_test/src/TestControllers.php \Drupal\paramconverter_test\TestControllers::testEntityLanguage()
1 string reference to 'TestControllers::testEntityLanguage'
- paramconverter_test.routing.yml in core/
modules/ system/ tests/ modules/ paramconverter_test/ paramconverter_test.routing.yml - core/modules/system/tests/modules/paramconverter_test/paramconverter_test.routing.yml
File
-
core/
modules/ system/ tests/ modules/ paramconverter_test/ src/ TestControllers.php, line 22
Class
- TestControllers
- Controller routine for testing the paramconverter.
Namespace
Drupal\paramconverter_testCode
public function testEntityLanguage(NodeInterface $node) {
$build = [
'#markup' => $node->label(),
];
\Drupal::service('renderer')->addCacheableDependency($build, $node);
return $build;
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.