当前位置: 首页>>代码示例>>PHP>>正文


PHP A::addStyleClass方法代码示例

本文整理汇总了PHP中A::addStyleClass方法的典型用法代码示例。如果您正苦于以下问题:PHP A::addStyleClass方法的具体用法?PHP A::addStyleClass怎么用?PHP A::addStyleClass使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在A的用法示例。


在下文中一共展示了A::addStyleClass方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: 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]))));
 }
开发者ID:gingerP,项目名称:shop,代码行数:31,代码来源:TreeView.php

示例2: 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;
 }
开发者ID:gingerP,项目名称:shop,代码行数:17,代码来源:TagUtils.php

示例3: createTopNavigationLinks

 public function createTopNavigationLinks()
 {
     $topNavigationLinks = new TopNavigationLinks();
     $mainDiv = new Div();
     $mainDiv->addStyleClass("top_panel");
     $linkToHome = new A();
     $linkToHome->addAttribute("href", "/");
     $linkToHome->addStyleClass("logo");
     $backGround = new Div();
     $backGround->addStyleClass("top_panel_background");
     $div11 = new Div();
     $div11->addStyleClasses(array("top_bar", "border-round-7px"));
     $div111 = new Div();
     $div111->updateId("top_panel_fixed");
     $div111->addChildList([$backGround, $linkToHome]);
     //TagUtils::createShadow($div111);
     $div1111 = new Div();
     $div1111->addStyleClass("top_bar_relative");
     $mainDiv->addChildList([$div11->addChild($div111->addChild($div1111))]);
     $div1111->addChild($topNavigationLinks->getDOM());
     return $mainDiv;
 }
开发者ID:gingerP,项目名称:shop,代码行数:22,代码来源:APagesCreator.php

示例4: getCatalogItemsTitle

 private function getCatalogItemsTitle()
 {
     $headContainer = new Div();
     $head = new Div();
     $head->addStyleClasses(["slogan_container_horizontal", "z-10"]);
     $leftEar = new Div();
     $leftEar->addStyleClass("slogan_left_ear");
     $rightEar = new Div();
     $rightEar->addStyleClass("slogan_right_ear");
     $sloganContainer = new Div();
     $slogan = new Div();
     $slogan->addStyleClass("slogan catalog_slogan");
     $slogan->addChild("Наша спецодежда позаботится о Вас.");
     $sloganContainer->addChildren($slogan);
     $head->addChildren($leftEar, $sloganContainer, $rightEar, $rightEar);
     $head2 = new Div();
     $head2->addStyleClasses(["slogan_container_horizontal", "z-9"]);
     $catalogLinkContainer = new A();
     $catalogLinkContainer->addAttribute("href", Labels::$TOP_NAVIGATION_LINKS[catalog]);
     $catalogLinkContainer->addStyleClass("main_page_catalog_link_container");
     $catalogLink = new Span();
     $catalogLink->addChild("Каталог");
     $catalogLink->addStyleClasses(["main_page_catalog_link button input_hover", "f-25"]);
     $catalogLinkContainer->addChildren($catalogLink);
     /*$rightEarForLink = new Div();
       $rightEarForLink->addStyleClasses(["slogan_right_ear", "background_dark"]);*/
     $head2->addChildren($catalogLinkContainer);
     $headContainer->addChildren($head, $head2);
     $slogan = new Div();
     $slogan->addStyleClass('catalog_slogan');
     $headContainer->addStyleClass("main_page_slogan_container");
     return $slogan->addChild($headContainer);
 }
开发者ID:gingerP,项目名称:shop,代码行数:33,代码来源:MainPage.php


注:本文中的A::addStyleClass方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。