public function leaveNode(Node
$node, Environment
$env): ?Node
{ if (!
$node instanceof ModuleNode
) { return $node;
} $component =
$this->
getComponent($node);
if (!
$component) { return $node;
} $line =
$node->
getTemplateLine();
$print_nodes =
[];
$component_id =
$component->
getPluginId();
$emoji =
static::
emojiForString($component_id);
if ($env->
isDebug()) { $print_nodes[] =
new PrintNode(new ConstantExpression(sprintf('<!-- %s Component start: %s -->',
$emoji,
$component_id),
$line),
$line);
} $print_nodes[] =
new PrintNode(new FunctionExpression( 'attach_library',
new Node([new ConstantExpression($component->
getLibraryName(),
$line)]),
$line ),
$line);
$print_nodes[] =
new PrintNode(new FunctionExpression( 'sdc_additional_context',
new Node([new ConstantExpression($component_id,
$line)]),