public function display(array $context, array $blocks = array()) { ob_start(); parent::display($context, $blocks); $content = ob_get_clean(); $content = $this->env->getExtension('assets')->buildContent($content); echo $content; }
/** * {@inheritdoc} */ public function display(array $context, array $blocks = array()) { $templateContext = clone $this->template->getContext(); if ($context) { $templateContext->replace($context); } if ($this->eventDispatcher !== null) { $this->eventDispatcher->dispatch('template.rendering: ' . $this->template->getName(), new TemplateEvent($this->template, $templateContext)); } parent::display($templateContext->toArray(), $blocks); }