本文整理汇总了PHP中A::addChild方法的典型用法代码示例。如果您正苦于以下问题:PHP A::addChild方法的具体用法?PHP A::addChild怎么用?PHP A::addChild使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类A
的用法示例。
在下文中一共展示了A::addChild方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: createBottomTreeDom
private function createBottomTreeDom()
{
$mainDiv = new Div();
$mainDiv->addStyleClass("bottom_panel");
$div01 = new Div();
$mainDiv->addChild($div01);
$div01->addStyleClasses(["bottom_panel_window"]);
$container = new Div();
$container->addStyleClasses(["bottom_panel_item", "w-31p"]);
$container->updateId("bottom_catalog_tree");
$containerChild = new Div();
$containerChild->addStyleClasses(["catalog"]);
$container->addChild($containerChild);
$div01->addChildList([$container]);
$mainTitle = new A();
$mainTitle->addChild("Каталог");
$mainTitle->addAttribute("href", Labels::$TOP_NAVIGATION_LINKS["catalog"]);
$mainTitle->addStyleClasses(["f-16", "title"]);
$containerChild->addChild($mainTitle);
$treeContainer = new Div();
$treeContainer->addStyleClass("content");
$containerChild->addChild($treeContainer);
$this->treeProcessBottom($this->mainTree, $treeContainer);
return $mainDiv;
}
示例2: mainTreeRender
private function mainTreeRender(Tree &$tree, $selectedKey)
{
$li = new Li();
$mainDiv = new Div();
$mainDiv->addStyleClasses(["expand", "text_non_select", "tree_text_node", "input_hover"]);
$table = new Table();
$tr = new Tr();
$nodeIcon = new Td();
$nodeText = new Td();
$nodeText->addStyleClass("tree_text");
$nodeSearchCount = new Td();
$nodeSearchCount->addStyleClass("tree_search_count");
if (count($tree->childrens) > 0) {
$nodeIcon->addStyleClasses(["tree_btn"]);
$icon = new Img();
$icon->addAttribute("style", "top: 2px; position: relative; margin: 0 5px;");
$icon->addAttribute("src", $this->treeLevel <= $this->DEFAULT_TREE_LEVEL_TO_SHOW || $tree->show ? "images/arrow90.png" : "images/arrow00.png");
$nodeIcon->addChild($icon);
} else {
$nodeIcon->addStyleClass("tree_empty");
}
$link = new A();
$link->addAttribute("href", URLBuilder::getCatalogLinkForTree($tree->key));
$link->addChild($tree->value);
$link->addStyleClass("input_hover");
$nodeSelected = new Div();
$nodeSelected->addStyleClass($tree->key == $selectedKey ? 'selected' : 'tree_empty');
$link->addChild($nodeSelected);
$nodeText->addChild($link);
return $li->addChild($mainDiv->addChild($table->addChild($tr->addChildList([$nodeIcon, $nodeText, $nodeSearchCount]))));
}
示例3: getLink
public function getLink($pageNumber, $num)
{
$mainTag = new A();
$mainTag->addStyleClasses(["link_style", "cursor_pointer", "text_non_select", "f-15", "input_hover"]);
$mainTag->addAttribute("href", URLBuilder::getCatalogLinkNumeric($pageNumber, $num));
$mainTag->addChild($pageNumber);
return $mainTag;
}
示例4: createNote
public static function createNote($text, $link)
{
$note = new A();
$note->addStyleClass("note");
$textWrapper01 = new Div();
$textWrapper = new Span();
$textWrapper->addChild($text);
$textWrapper01->addChild($textWrapper);
$note->addChild($textWrapper01);
if (strlen($link) > 0) {
$note->addAttribute("href", $link);
$note->addStyleClasses(["hover_text_underline"]);
} else {
$note->addStyleClasses(["cursor_default"]);
}
return $note;
}
示例5: getItemButton
public static function getItemButton($url)
{
$button = new A();
$button->addStyleClasses(["catalog_item_button", "f-17", "input_hover"]);
$button->addChild("подробнее");
$button->addAttribute("href", $url);
return $button;
}