public function TestingExampleController::simpletestDescription in Examples for Developers 8
Same name and namespace in other branches
- 3.x modules/testing_example/src/Controller/TestingExampleController.php \Drupal\testing_example\Controller\TestingExampleController::simpletestDescription()
Generate a render array for the Simpletest description.
Return value
array A render array.
1 string reference to 'TestingExampleController::simpletestDescription'
- testing_example.routing.yml in testing_example/
testing_example.routing.yml - testing_example/testing_example.routing.yml
File
- testing_example/
src/ Controller/ TestingExampleController.php, line 32
Class
- TestingExampleController
- Controller for testing_example module.
Namespace
Drupal\testing_example\ControllerCode
public function simpletestDescription() {
$template_file = drupal_get_path('module', 'testing_example') . '/templates/simpletest.description.html.twig';
$build = [
'description' => [
'#type' => 'inline_template',
'#template' => file_get_contents($template_file),
],
];
return $build;
}