本文整理匯總了PHP中URLBuilder::getCatalogLinkForSingleItem方法的典型用法代碼示例。如果您正苦於以下問題:PHP URLBuilder::getCatalogLinkForSingleItem方法的具體用法?PHP URLBuilder::getCatalogLinkForSingleItem怎麽用?PHP URLBuilder::getCatalogLinkForSingleItem使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類URLBuilder
的用法示例。
在下文中一共展示了URLBuilder::getCatalogLinkForSingleItem方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: getCompactItemView
public static function getCompactItemView($name, $images, $itemId, $pageNumber, $num, $key, $valueToSearch, $type, $trimName, $isHighLightElement)
{
$blackOut = new Div();
$blackOut->addStyleClasses(["blackout", "catalog_item_button_container"]);
$blackOut->addAttributes(["itemscope" => "", "itemtype" => "http://data-vocabulary.org/Product"]);
$mainDiv = new Div();
$blackOut->addChild($mainDiv);
TagUtils::createShadow($mainDiv);
$mainDiv->addStyleClasses(["simple_item_compact", $isHighLightElement ? Constants::HIGH_LIGHT_ELEMENT : ""]);
$imagesContainer = new Div();
$imagesContainer->addStyleClass("catalog_img_container");
$mainDiv->addChild($imagesContainer);
$index = 0;
foreach ($images as $image) {
if ($index == 1) {
break;
}
$imgView = new Img();
$imgView->addAttributes(array("src" => addslashes($image), "alt" => $name, TagLabels::ON_CLICK => "openSimpleImg(arguments[0])"));
$imagesContainer->addChild($imgView);
$index++;
}
if ($type == 'HARD') {
$url = URLBuilder::getCatalogLinkForSingleItem($pageNumber, $num, $itemId, array(UrlParameters::KEY => $key, UrlParameters::SEARCH_VALUE => $valueToSearch));
$mainDiv->addStyleClass("cursor_pointer");
$link = TagUtils::createNote($trimName, "");
$blackOut->addChild($link);
$blackOut->addChild(self::getItemButton($url));
} elseif ($type == 'SIMPLE') {
$text = TagUtils::createNote($trimName, "");
$blackOut->addChild($text);
}
return $blackOut;
}