本文整理匯總了PHP中URLBuilder::getItemLinkForComplexType方法的典型用法代碼示例。如果您正苦於以下問題:PHP URLBuilder::getItemLinkForComplexType方法的具體用法?PHP URLBuilder::getItemLinkForComplexType怎麽用?PHP URLBuilder::getItemLinkForComplexType使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類URLBuilder
的用法示例。
在下文中一共展示了URLBuilder::getItemLinkForComplexType方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: 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);
}