當前位置: 首頁>>代碼示例>>PHP>>正文


PHP Div::addChildList方法代碼示例

本文整理匯總了PHP中Div::addChildList方法的典型用法代碼示例。如果您正苦於以下問題:PHP Div::addChildList方法的具體用法?PHP Div::addChildList怎麽用?PHP Div::addChildList使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在Div的用法示例。


在下文中一共展示了Div::addChildList方法的6個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: createGeneralContent

 protected function createGeneralContent()
 {
     $mainTag = new Div();
     $mainTag->addStyleClasses(["map_page", "float_left"]);
     $mainTag->addChildList([$this->getInfoBlock(), $this->getMap()]);
     return $mainTag;
 }
開發者ID:gingerP,項目名稱:shop,代碼行數:7,代碼來源:ContactsPage.php

示例2: getItemInfo

 private function getItemInfo($name, $description)
 {
     $mainTag = new Div();
     $itemTitle = new Div();
     $itemTitle->addStyleClasses(["title", "font_arial"]);
     $itemTitle->addChild($name);
     $itemDescription = new Div();
     $itemDescription->addStyleClasses(["title", "font_arial"]);
     $itemDescription->addChild($description);
     return $mainTag->addChildList([$itemTitle, $itemDescription]);
 }
開發者ID:gingerP,項目名稱:shop,代碼行數:11,代碼來源:SingleItemPage.php

示例3: getDOMForViewMode

 private static function getDOMForViewMode($type)
 {
     $mainDom = new Div();
     $mainDom->addStyleClass($type);
     $mainDom->addAttribute("view_type", $type);
     switch ($type) {
         case "compact":
             $mainDom->addChildList([new Div(), new Div(), new Div(), new Div(), new Div(), new Div()]);
             break;
         case "extend":
             $mainDom->addChildList([new Div(), new Div(), new Div()]);
             break;
         case "metro":
             $mainDom->addChildList([new Div(), new Div()]);
             break;
         default:
             $mainDom->addChildList([new Div(), new Div(), new Div(), new Div(), new Div(), new Div()]);
     }
     return $mainDom;
 }
開發者ID:gingerP,項目名稱:shop,代碼行數:20,代碼來源:PathLinks.php

示例4: createPathLinks

 public function createPathLinks()
 {
     $mainTag = new Div();
     $mainTag->addStyleClasses(["path_link", "f-16"]);
     /*$blockForTree = new Div();
       $blockForTree->addStyleClasses(["w-18p"]);*/
     $blockForCatalog = new Div();
     $blockForCatalog->addStyleClasses(["path_link_chain"]);
     $mainTag->addChildList([$blockForCatalog->addChild($this->getPathLinkForMainBlock()), $this->getViewModeBlock()]);
     return $mainTag;
 }
開發者ID:gingerP,項目名稱:shop,代碼行數:11,代碼來源:APagesCreator.php

示例5: renderGalleryItemWithSingleItem

 private function renderGalleryItemWithSingleItem($data)
 {
     $mainDiv = new Div();
     $mainDiv->addStyleClasses(["main_page_item", "blackout", "catalog_item_button_container"]);
     $container = new Div();
     $container->addStyleClass("main_page_item_sub");
     $urlToItem = URLBuilder::getItemLinkForComplexType("", $data[DB::TABLE_GOODS__KEY_ITEM], 1, 48);
     $itemImagePath = '';
     $itemName = $data[DB::TABLE_GOODS__NAME];
     $images = FileUtils::getFilesByPrefixByDescription(Constants::DEFAULT_ROOT_CATALOG_PATH . DIRECTORY_SEPARATOR . $data[DB::TABLE_GOODS__KEY_ITEM] . DIRECTORY_SEPARATOR, Constants::MEDIUM_IMAGE, 'jpg');
     if ($images[0] == '') {
         $itemImagePath = FileUtils::getCapImage(Labels::CAP_IMAGE_FOR_CLOTHING);
     } else {
         $itemImagePath = $images[0];
     }
     $singleItemView = new Div();
     $singleItemView->addStyleClasses(["main_page_item_sub_single"]);
     $imgView = new Img();
     $noteView = null;
     $imgView->addAttribute("src", $itemImagePath);
     if ($data[DB::TABLE_GOODS__GOD_TYPE] == "HARD") {
         $singleItemView->addStyleClass("cursor_pointer");
         $noteView = TagUtils::createNote($itemName, "");
     } else {
         $noteView = TagUtils::createNote($itemName, "");
     }
     $noteView->addStyleClasses(["f-15"]);
     $container->addChildList([$singleItemView, $noteView, Item::getItemButton($urlToItem)]);
     $singleItemView->addChild($imgView);
     return $mainDiv->addChild($container);
 }
開發者ID:gingerP,項目名稱:shop,代碼行數:31,代碼來源:MainPage.php

示例6: createPriceListLink

 public static function createPriceListLink()
 {
     $pref = new DBPreferencesType();
     $pricesDir = $pref->getPreference(Constants::PRICE_DIRECTORY)[DB::TABLE_PREFERENCES__VALUE];
     $prices = FileUtils::getFilesByDescription($pricesDir, 'xls');
     $descriptions = FileUtils::getFilesByDescription($pricesDir, 'txt');
     $mainTag = new Div();
     $mainTag->addStyleClass("download_table");
     for ($index = 0; $index < count($prices); $index++) {
         $priceItem = new Div();
         $priceIcon = new Div();
         $priceIcon->addStyleClasses(["price_icon", "float_left"]);
         $priceText = new Div();
         $priceText->addStyleClass(["download_description", "float_left"]);
         $priceText->addChild(file_get_contents($descriptions[$index]));
         $priceItem->addChildList([$priceIcon, $priceText]);
         $mainTag->addChild($priceItem);
     }
     return $mainTag;
 }
開發者ID:gingerP,項目名稱:shop,代碼行數:20,代碼來源:TopNavigationLinks.php


注:本文中的Div::addChildList方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。