function DescriptionTemplateTrait::getDescriptionTemplatePath
Same name in other branches
- 3.x src/Utility/DescriptionTemplateTrait.php \Drupal\examples\Utility\DescriptionTemplateTrait::getDescriptionTemplatePath()
- 8.x-1.x src/Utility/DescriptionTemplateTrait.php \Drupal\examples\Utility\DescriptionTemplateTrait::getDescriptionTemplatePath()
Get full path to the template.
Return value
string Path string.
1 call to DescriptionTemplateTrait::getDescriptionTemplatePath()
- DescriptionTemplateTrait::description in src/
Utility/ DescriptionTemplateTrait.php - Generate a render array with our templated content.
File
-
src/
Utility/ DescriptionTemplateTrait.php, line 74
Class
- DescriptionTemplateTrait
- Trait to implement a "drop-in" template for Example's controllers.
Namespace
Drupal\examples\UtilityCode
protected function getDescriptionTemplatePath() {
return \Drupal::service('extension.list.module')->getPath($this->getModuleName()) . '/templates/description.html.twig';
}