当前位置: 首页>>代码示例>>PHP>>正文


PHP PageList::setViewPagePermissionKeyHandle方法代码示例

本文整理汇总了PHP中PageList::setViewPagePermissionKeyHandle方法的典型用法代码示例。如果您正苦于以下问题:PHP PageList::setViewPagePermissionKeyHandle方法的具体用法?PHP PageList::setViewPagePermissionKeyHandle怎么用?PHP PageList::setViewPagePermissionKeyHandle使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在PageList的用法示例。


在下文中一共展示了PageList::setViewPagePermissionKeyHandle方法的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;
 }
开发者ID:Zyqsempai,项目名称:amanet,代码行数:58,代码来源:sitemap.php

示例2: die

<?php

defined('C5_EXECUTE') or die("Access Denied.");
$sh = Loader::helper('concrete/dashboard/sitemap');
if (!$sh->canRead()) {
    die(t('Access Denied'));
}
session_write_close();
$keywords = $_REQUEST['q'];
Loader::model('page_list');
$pl = new PageList();
$pl->filterByName($keywords);
if (PERMISSIONS_MODEL != 'simple') {
    $pl->setViewPagePermissionKeyHandle('view_page_in_sitemap');
}
$pl->ignoreAliases();
$pl->sortBy('cID', 'asc');
$pl->setItemsPerPage(5);
$pages = $pl->getPage();
$results = array();
$nh = Loader::helper('navigation');
foreach ($pages as $c) {
    $obj = new stdClass();
    $obj->href = $nh->getLinkToCollection($c);
    $obj->cID = $c->getCollectionID();
    $obj->name = $c->getCollectionName();
    $results[] = $obj;
}
print Loader::helper("json")->encode($results);
开发者ID:Zyqsempai,项目名称:amanet,代码行数:29,代码来源:intelligent_search.php


注:本文中的PageList::setViewPagePermissionKeyHandle方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。