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 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)); }