You are here

public function LanguageTestController::testEntity in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 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 $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 67
Contains \Drupal\language_test\Controller\LanguageTestController.

Class

LanguageTestController
Controller routines for language_test routes.

Namespace

Drupal\language_test\Controller

Code

public function testEntity(ConfigurableLanguageInterface $configurable_language) {
  return array(
    '#markup' => $this
      ->t('Loaded %label.', array(
      '%label' => $configurable_language
        ->label(),
    )),
  );
}