本文整理匯總了PHP中Items::getItemsTable方法的典型用法代碼示例。如果您正苦於以下問題:PHP Items::getItemsTable方法的具體用法?PHP Items::getItemsTable怎麽用?PHP Items::getItemsTable使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類Items
的用法示例。
在下文中一共展示了Items::getItemsTable方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: createGeneralContent
protected function createGeneralContent()
{
$mainTag = new Div();
$mainTag->addAttribute("style", "margin: 1px 0px 0px 3px;");
$items = new Items();
$catalogLinks = new CatalogLinks();
if (array_key_exists(UrlParameters::PAGE_NAME, $_GET)) {
$pageNumber = Constants::DEFAULT_PAGE_NUMBER;
$itemsCount = Labels::VIEW_MODE_NUMERIC_DEF;
if (array_key_exists(UrlParameters::PAGE_NUM, $_GET)) {
$pageNumber = Utils::getFromGET(UrlParameters::PAGE_NUM);
}
if (array_key_exists(UrlParameters::ITEMS_COUNT, $_GET)) {
$itemsCount = Utils::getFromGET(UrlParameters::ITEMS_COUNT);
}
if (array_key_exists(UrlParameters::SEARCH_VALUE, $_GET)) {
$itemsType = new CatalogLoader();
$searchValue = Utils::getFromGET(UrlParameters::SEARCH_VALUE);
$itemsType->getItemSearchData($pageNumber, $itemsCount, $searchValue);
if ($itemsType->dataTotalCount == 0) {
return "";
}
$mainTag->addChild($catalogLinks->getPaginationLinks($pageNumber, $itemsCount, $itemsType->dataTotalCount, 'top'));
$mainTag->addChild($items->getItemsTable($pageNumber, $itemsCount, $itemsType->data, '', $searchValue));
$mainTag->addChild($catalogLinks->getPaginationLinks($pageNumber, $itemsCount, $itemsType->dataTotalCount, 'bottom'));
} else {
if (array_key_exists(UrlParameters::KEY, $_GET)) {
$itemsType = new CatalogLoader();
$keyValue = Utils::getFromGET(UrlParameters::KEY);
$itemsType->getItemsMenuData($pageNumber, $itemsCount, $keyValue);
$mainTag->addChild($catalogLinks->getPaginationLinks($pageNumber, $itemsCount, $itemsType->dataTotalCount, 'top'));
$mainTag->addChild($items->getItemsTable($pageNumber, $itemsCount, $itemsType->data, $keyValue, ''));
$mainTag->addChild($catalogLinks->getPaginationLinks($pageNumber, $itemsCount, $itemsType->dataTotalCount, 'bottom'));
} else {
$itemsType = new CatalogLoader();
$itemsType->getItemsMainData($pageNumber, $itemsCount);
$mainTag->addChild($catalogLinks->getPaginationLinks($pageNumber, $itemsCount, $itemsType->dataTotalCount, 'top'));
$mainTag->addChild($items->getItemsTable($pageNumber, $itemsCount, $itemsType->data, '', ''));
$mainTag->addChild($catalogLinks->getPaginationLinks($pageNumber, $itemsCount, $itemsType->dataTotalCount, 'bottom'));
}
}
}
return $mainTag;
}