class FieldExampleController in Examples for Developers 8
Same name and namespace in other branches
- 3.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 DescriptionTemplateTrait
Expanded class hierarchy of FieldExampleController
File
- 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
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
DescriptionTemplateTrait:: |
public | function | Generate a render array with our templated content. | |
DescriptionTemplateTrait:: |
protected | function | Get full path to the template. | |
DescriptionTemplateTrait:: |
protected | function | Variables to act as context to the twig template file. | 1 |
FieldExampleController:: |
protected | function |
Name of our module. Overrides DescriptionTemplateTrait:: |