function LanguageTestController::testEntity
Same name in other branches
- 9 core/modules/language/tests/language_test/src/Controller/LanguageTestController.php \Drupal\language_test\Controller\LanguageTestController::testEntity()
- 10 core/modules/language/tests/language_test/src/Controller/LanguageTestController.php \Drupal\language_test\Controller\LanguageTestController::testEntity()
- 11.x core/modules/language/tests/language_test/src/Controller/LanguageTestController.php \Drupal\language_test\Controller\LanguageTestController::testEntity()
Route entity upcasting test helper.
Parameters
\Drupal\language\ConfigurableLanguageInterface $configurable_language: The ConfigurableLanguage object from the route.
Return value
string Testing feedback based on (translated) entity title.
1 string reference to 'LanguageTestController::testEntity'
- language_test.routing.yml in core/
modules/ language/ tests/ language_test/ language_test.routing.yml - core/modules/language/tests/language_test/language_test.routing.yml
File
-
core/
modules/ language/ tests/ language_test/ src/ Controller/ LanguageTestController.php, line 62
Class
- LanguageTestController
- Controller routines for language_test routes.
Namespace
Drupal\language_test\ControllerCode
public function testEntity(ConfigurableLanguageInterface $configurable_language) {
return [
'#markup' => $this->t('Loaded %label.', [
'%label' => $configurable_language->label(),
]),
];
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.