public function LanguageTestController::testEntity in Drupal 9
Same name and namespace in other branches
- 8 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 64
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(),
]),
];
}