本文整理汇总了PHP中Component::loadAssociatedMarkup方法的典型用法代码示例。如果您正苦于以下问题:PHP Component::loadAssociatedMarkup方法的具体用法?PHP Component::loadAssociatedMarkup怎么用?PHP Component::loadAssociatedMarkup使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Component
的用法示例。
在下文中一共展示了Component::loadAssociatedMarkup方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: onComponentTagBody
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));
}
示例2: renderHead
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();
}
}
示例3: onComponentTagBody
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));
}