class FieldExampleController
Same name in other branches
- 8.x-1.x field_example/src/Controller/FieldExampleController.php \Drupal\field_example\Controller\FieldExampleController
- 4.0.x modules/field_example/src/Controller/FieldExampleController.php \Drupal\field_example\Controller\FieldExampleController
Controller for field example description page.
This class uses the DescriptionTemplateTrait to display text we put in the templates/description.html.twig file.
Hierarchy
- class \Drupal\field_example\Controller\FieldExampleController uses \Drupal\examples\Utility\DescriptionTemplateTrait
Expanded class hierarchy of FieldExampleController
File
-
modules/
field_example/ src/ Controller/ FieldExampleController.php, line 13
Namespace
Drupal\field_example\ControllerView source
class FieldExampleController {
use DescriptionTemplateTrait;
/**
* {@inheritdoc}
*/
protected function getModuleName() {
return 'field_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 | |
FieldExampleController::getModuleName | protected | function | Name of our module. | Overrides DescriptionTemplateTrait::getModuleName |