class HooksExampleController
Same name in other branches
- 8.x-1.x hooks_example/src/Controller/HooksExampleController.php \Drupal\hooks_example\Controller\HooksExampleController
- 4.0.x modules/hooks_example/src/Controller/HooksExampleController.php \Drupal\hooks_example\Controller\HooksExampleController
Controller for Hooks example description page.
This class uses the DescriptionTemplateTrait to display text we put in the templates/description.html.twig file.
Hierarchy
- class \Drupal\hooks_example\Controller\HooksExampleController uses \Drupal\examples\Utility\DescriptionTemplateTrait
Expanded class hierarchy of HooksExampleController
File
-
modules/
hooks_example/ src/ Controller/ HooksExampleController.php, line 13
Namespace
Drupal\hooks_example\ControllerView source
class HooksExampleController {
use DescriptionTemplateTrait;
/**
* {@inheritdoc}
*/
protected function getModuleName() {
return 'hooks_example';
}
}
Members
Title Sort descending | Modifiers | Object type | Summary | Overriden Title | Overrides |
---|---|---|---|---|---|
DescriptionTemplateTrait::description | public | function | Generate a render array with our templated content. | ||
DescriptionTemplateTrait::getDescriptionTemplatePath | protected | function | Get full path to the template. | ||
DescriptionTemplateTrait::getDescriptionVariables | protected | function | Variables to act as context to the twig template file. | 1 | |
HooksExampleController::getModuleName | protected | function | Name of our module. | Overrides DescriptionTemplateTrait::getModuleName |