Example #1
0
 /**
  * {@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);
 }