function DescriptionTemplateTrait::getDescriptionVariables
Same name in other branches
- 3.x src/Utility/DescriptionTemplateTrait.php \Drupal\examples\Utility\DescriptionTemplateTrait::getDescriptionVariables()
- 4.0.x src/Utility/DescriptionTemplateTrait.php \Drupal\examples\Utility\DescriptionTemplateTrait::getDescriptionVariables()
Variables to act as context to the twig template file.
Return value
array Associative array that defines context for a template.
1 call to DescriptionTemplateTrait::getDescriptionVariables()
- DescriptionTemplateTrait::description in src/
Utility/ DescriptionTemplateTrait.php - Generate a render array with our templated content.
1 method overrides DescriptionTemplateTrait::getDescriptionVariables()
- SampleExampleController::getDescriptionVariables in tests/
modules/ examples_description_test/ src/ Controller/ SampleExampleController.php - We override this so we can see some substitutions.
File
-
src/
Utility/ DescriptionTemplateTrait.php, line 61
Class
- DescriptionTemplateTrait
- Trait to implement a "drop-in" template for Example's controllers.
Namespace
Drupal\examples\UtilityCode
protected function getDescriptionVariables() {
$variables = [
'module' => $this->getModuleName(),
];
return $variables;
}