public function __construct( protected ComponentPluginManager
$pluginManager,
protected ComponentValidator
$componentValidator ) {} /**
* {@inheritdoc}
*/
public function getNodeVisitors(): array
{ return [new ComponentNodeVisitor($this->pluginManager
)];
} /**
* {@inheritdoc}
*/
public function getFunctions(): array
{ return [ new TwigFunction( 'sdc_additional_context',
[$this, 'addAdditionalContext'
],
['needs_context' => TRUE
] ),