本文整理汇总了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;
}