public function onComponentTagBody(Component $component, ComponentTag &$tag)
 {
     $panelMarkup = $component->loadAssociatedMarkup();
     $panel = MarkupUtils::findPiconTag('panel', $panelMarkup, $component);
     if ($panel == null) {
         throw new \MarkupNotFoundException(sprintf("Found markup for panel %s however there is no picon:panel tag.", $component->getId(0)));
     }
     $tag->setChildren(array($panel));
 }
 public function renderHead(Component $component, HeaderContainer $headerContainer, HeaderResponse $headerResponse)
 {
     $markup = $component->loadAssociatedMarkup();
     $heads = $this->findHead(array($markup));
     foreach ($heads as $index => $head) {
         $id = $component->getId() . '_head_' . $index;
         $headerPart = new HeaderPartContainer($id, $head);
         $headerPart->render();
     }
 }
 public function onComponentTagBody(Component $component, ComponentTag &$tag)
 {
     $borderMarkup = $component->loadAssociatedMarkup();
     $border = MarkupUtils::findPiconTag('border', $borderMarkup, $component);
     if ($border == null) {
         throw new \MarkupNotFoundException(sprintf("Found markup for border %s however there is no picon:border tag.", $component->getId(0)));
     }
     $body = MarkupUtils::findPiconTag('body', $borderMarkup);
     if ($body == null) {
         throw new \RuntimeException('No picon:body tag was found in border.');
     }
     $body->setChildren($tag->getChildren());
     $tag->setChildren(array($border));
 }