function TwigExtension::getFunctions
Same name in this branch
- 11.x core/lib/Drupal/Core/Template/TwigExtension.php \Drupal\Core\Template\TwigExtension::getFunctions()
Same name in other branches
- 9 core/lib/Drupal/Core/Template/TwigExtension.php \Drupal\Core\Template\TwigExtension::getFunctions()
- 8.9.x core/lib/Drupal/Core/Template/TwigExtension.php \Drupal\Core\Template\TwigExtension::getFunctions()
- 10 core/modules/sdc/src/Twig/TwigExtension.php \Drupal\sdc\Twig\TwigExtension::getFunctions()
- 10 core/lib/Drupal/Core/Template/TwigExtension.php \Drupal\Core\Template\TwigExtension::getFunctions()
File
-
core/
modules/ sdc/ src/ Twig/ TwigExtension.php, line 44
Class
- TwigExtension
- The twig extension so Drupal can recognize the new code.
Namespace
Drupal\sdc\TwigCode
public function getFunctions() : array {
return [
new TwigFunction('sdc_additional_context', [
$this,
'addAdditionalContext',
], [
'needs_context' => TRUE,
]),
new TwigFunction('sdc_validate_props', [
$this,
'validateProps',
], [
'needs_context' => TRUE,
]),
];
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.