コード例 #1
0
ファイル: MainPage.php プロジェクト: gingerP/shop
 private function getCatalogItems()
 {
     $dbGoods = new DBGoodsType();
     $catalogLoader = new CatalogLoader();
     $catalogLoader->getItemsMainData(1, 8);
     $goods = $dbGoods->extractDataFromResponse($catalogLoader->data, DB::TABLE_GOODS___MAPPER);
     $goodIndex = 0;
     $slideShowContainer = new Div();
     $slideShowContainer->addStyleClass("main_page_items_slideshow");
     $slideShow = new Div();
     $slideShow->addStyleClasses(["slide_show", "catalog_items"]);
     $div02 = new Div();
     $div02->addAttribute("style", "overflow: hidden;");
     while ($goodIndex < count($goods)) {
         $div02->addChild($this->renderGalleryItemWithSingleItem($goods[$goodIndex]));
         $goodIndex++;
     }
     $slideShowContainer->addChildren($slideShow->addChildren($div02));
     return [$this->getCatalogItemsTitle(), $slideShowContainer];
 }
コード例 #2
0
ファイル: GoodsService.php プロジェクト: gingerP/shop
 public static function getGoodsOrder()
 {
     $dbGoods = new DBGoodsType();
     $data = $dbGoods->getAdminSortedForCommon(0, PHP_INT_MAX);
     Log::db("getGoodsOrder ");
     $mappings = [DB::TABLE_GOODS__ID => DB::TABLE_GOODS__ID, DB::TABLE_GOODS__KEY_ITEM => DB::TABLE_GOODS__KEY_ITEM, DB::TABLE_GOODS__NAME => DB::TABLE_GOODS__NAME, DB::TABLE_USER_ORDER__GOOD_ID => DB::TABLE_USER_ORDER__GOOD_ID, DB::TABLE_USER_ORDER__GOOD_INDEX => DB::TABLE_USER_ORDER__GOOD_INDEX];
     $goods = $dbGoods->extractDataFromResponse($data, $mappings);
     return self::mergeImagesToGoods($goods);
 }