本文整理汇总了PHP中PageList::includeSystemPages方法的典型用法代码示例。如果您正苦于以下问题:PHP PageList::includeSystemPages方法的具体用法?PHP PageList::includeSystemPages怎么用?PHP PageList::includeSystemPages使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类PageList
的用法示例。
在下文中一共展示了PageList::includeSystemPages方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: getSubNodes
function getSubNodes($cID, $level = 0, $keywords = '', $autoOpenNodes = true)
{
$db = Loader::db();
$obj = new stdClass();
if (isset($cID) && (Loader::helper('validation/numbers')->integer($cID) || $cID == 0)) {
if ($keywords != '' && $keywords != false) {
$nc = Page::getByID($cID, 'RECENT');
$pl = new PageList();
if (PERMISSIONS_MODEL != 'simple') {
$pl->setViewPagePermissionKeyHandle('view_page_in_sitemap');
}
$obj->keywords = $keywords;
$pl->filterByName($keywords);
$pl->ignoreAliases();
$pl->filterByPath($nc->getCollectionPath());
$pl->displayUnapprovedPages();
$pl->sortByDisplayOrder();
$results = $pl->get(SITEMAP_PAGES_LIMIT);
$total = $pl->getTotal();
} else {
$pl = new PageList();
if (PERMISSIONS_MODEL != 'simple') {
$pl->setViewPagePermissionKeyHandle('view_page_in_sitemap');
}
$pl->sortByDisplayOrder();
if (ConcreteDashboardSitemapHelper::showSystemPages()) {
$pl->includeSystemPages();
$pl->includeInactivePages();
}
$pl->filterByParentID($cID);
$pl->displayUnapprovedPages();
$total = $pl->getTotal();
if ($cID == 1) {
$results = $pl->get();
} else {
$pl->setItemsPerPage(SITEMAP_PAGES_LIMIT);
$results = $pl->getPage();
}
}
$nodes = array();
foreach ($results as $c) {
$n = ConcreteDashboardSitemapHelper::getNode($c, $level + 1, $autoOpenNodes);
if ($n != false) {
$nodes[] = $n;
}
}
$obj->total = $total;
$obj->nodeID = $cID;
$obj->pageList = $pl;
$obj->results = $nodes;
} else {
$obj->total = 0;
$obj->nodeID = 0;
$obj->pageList = null;
$obj->results = null;
}
return $obj;
}
示例2: getSubNodes
function getSubNodes($cID, $level = 0, $keywords = '', $autoOpenNodes = true) {
$db = Loader::db();
$obj = new stdClass;
if ($keywords != '' && $keywords != false) {
$nc = Page::getByID($cID, 'RECENT');
$pl = new PageList();
$obj->keywords = $keywords;
$pl->filterByName($keywords);
$pl->filterByPath($nc->getCollectionPath());
$pl->displayUnapprovedPages();
$pl->sortByDisplayOrder();
$results = $pl->get(SITEMAP_PAGES_LIMIT);
$total = $pl->getTotal();
} else {
$pl = new PageList();
$pl->sortByDisplayOrder();
if (ConcreteDashboardSitemapHelper::showSystemPages()) {
$pl->includeSystemPages();
}
$pl->filterByParentID($cID);
$pl->displayUnapprovedPages();
$total = $pl->getTotal();
if ($cID == 1) {
$results = $pl->get();
} else {
$pl->setItemsPerPage(SITEMAP_PAGES_LIMIT);
$results = $pl->getPage();
}
}
$nodes = array();
foreach($results as $c) {
$n = ConcreteDashboardSitemapHelper::getNode($c, $level+1, $autoOpenNodes);
if ($n != false) {
$nodes[] = $n;
}
}
$obj->total = $total;
$obj->nodeID = $cID;
$obj->pageList = $pl;
$obj->results = $nodes;
return $obj;
}