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


PHP Page::getPages方法代码示例

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


在下文中一共展示了Page::getPages方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: showPages

function showPages($node)
{
    $aryPages = Page::getPages($node, false);
    for ($i = 0; $i < count($aryPages); $i++) {
        $strName = $aryPages[$i]->getName();
        $strEntry = $node . "/" . $strName;
        $strID = "node_" . md5("{$strEntry}");
        $numChildren = count(Page::getPages($strEntry, false));
        //$aryChildren = array();
        echo "<li class=\"";
        if (array_key_exists($strEntry, $_SESSION["nodes"]) && $_SESSION["nodes"][$strEntry] == "open") {
            echo "open";
        } elseif ($numChildren > 0) {
            echo "closed";
        } else {
            echo "empty";
        }
        echo "\">";
        echo "<a href=\"#\" class=\"node\" onclick=\"clickNode(this.parentNode, '{$strEntry}', '#{$strID}');return false;\">&nbsp;</a>";
        echo "<a href=\"../node-edit.php?node={$strEntry}\" target=\"main\" rel=\"{$strEntry}\">{$strName}</a>";
        echo "<ul id=\"{$strID}\" REL=\"{$strEntry}\">";
        if (array_key_exists($strEntry, $_SESSION["nodes"]) && $_SESSION["nodes"][$strEntry] == "open") {
            showPages($strEntry);
        }
        echo "</ul>";
        echo "</li>";
    }
}
开发者ID:joel-cass,项目名称:structure-cms,代码行数:28,代码来源:node-tree.php

示例2: getDescendants

 public static function getDescendants($node, $contentType = "", array $aryPages = array())
 {
     $aryTemp = Page::getPages($node);
     foreach ($aryTemp as $objPage) {
         if ($contentType == "" || $objPage->getContentType() == $contentType) {
             $aryPages[] = $objPage;
             $aryPages = PageHelper::getDescendants($objPage->path, $contentType, $aryPages);
         }
     }
     return $aryPages;
 }
开发者ID:joel-cass,项目名称:structure-cms,代码行数:11,代码来源:PageHelper.php

示例3: getNodeList

function getNodeList($path, $aryReturn = array())
{
    $aryPages = Page::getPages($path, false);
    for ($i = 0; $i < count($aryPages); $i++) {
        $strEntry = $aryPages[$i]->path;
        $strURL = $aryPages[$i]->getURL();
        $aryReturn[] = "[\"" . $strEntry . "\", \"" . $strURL . "\"]";
        $aryReturn = getNodeList($strEntry, $aryReturn);
    }
    return $aryReturn;
}
开发者ID:joel-cass,项目名称:structure-cms,代码行数:11,代码来源:tinymce-node-list.php

示例4: getNodeList

 private function getNodeList($path, $aryReturn = array(""))
 {
     $aryPages = Page::getPages($path, false);
     for ($i = 0; $i < count($aryPages); $i++) {
         $strEntry = $aryPages[$i]->path;
         $strURL = $aryPages[$i]->getURL();
         $aryReturn[] = $strEntry;
         $aryReturn = $this->getNodeList($strEntry, $aryReturn);
     }
     return $aryReturn;
 }
开发者ID:joel-cass,项目名称:structure-cms,代码行数:11,代码来源:link.php

示例5: detailAction

 public function detailAction()
 {
     $id = $this->getRequest()->getParam('id');
     //     		 echo $id;
     //     		 exit();
     $modelPage = new Page();
     $page = $modelPage->getPage($id);
     $this->view->page = $page;
     //获取其他新闻列表
     $where = "id != " . $id;
     $pages = $modelPage->getPages($where);
     $this->view->pages = $pages->toArray();
 }
开发者ID:veaglefly,项目名称:BlogCodes,代码行数:13,代码来源:PageController.php

示例6: indexAction

 public function indexAction()
 {
     // 博客列表
     $modelBlog = new Page();
     $where = array('type' => 'now');
     $blogs = $modelBlog->getPages($where);
     $paginator = new Zend_Paginator($blogs);
     $paginator->setItemCountPerPage(5);
     $paginator->setPageRange(5);
     // 获得当前显示的页码
     $page = $this->_request->getParam('page');
     $paginator->setCurrentPageNumber($page);
     // 渲染到视图
     $this->view->blogs = $paginator;
     $this->_helper->cache(array('index', 'view'), array('gook'));
 }
开发者ID:veaglefly,项目名称:BlogCodes,代码行数:16,代码来源:NowController.php

示例7: index

 public function index()
 {
     $pages = Page::getPages($this->paginate, $this->orderBy);
     $backendPages = new \Jamesy\BackendPages($pages);
     $pagesHtml = $backendPages->getPagesHtml();
     $orderBy = 1;
     switch ($this->orderBy) {
         case ['id', 'asc']:
             $orderBy = 1;
             break;
         case ['id', 'desc']:
             $orderBy = 2;
             break;
         case ['title', 'asc']:
             $orderBy = 3;
             break;
         case ['title', 'desc']:
             $orderBy = 4;
             break;
     }
     return View::make('backend.pages.index', ['user' => $this->user, 'isAdmin' => $this->isAdmin, 'configs' => $this->configs, 'pagesHtml' => $pagesHtml, 'logged_in_for' => $this->logged_in_for, 'activeParent' => $this->activeParent, 'active' => 'allpages', 'records' => $this->paginate, 'orderBy' => $orderBy, 'links' => $pages->links('backend.pagination.nifty'), 'type' => 'notdeleted']);
 }
开发者ID:shinichi81,项目名称:Nifty-Newsletter,代码行数:22,代码来源:PageController.php

示例8: indexAction

 public function indexAction()
 {
     // action body
     $modelPage = new Page();
     //实例化模型对象
     $where = array('star' => 4, 'top' => 1);
     // 定义查询条件
     $newsStar = $modelPage->getPage($where);
     //使用模型的getPage方法获取文章
     $this->view->newsStar = $newsStar;
     // 输出到view视图
     // 新闻文章列表
     $where_list = array('star' => 4, 'top' => 0);
     $order = 'createtime DESC';
     $limit = 5;
     $newsList = $modelPage->getPages($where_list, $order, $limit);
     $paginator = new Zend_Paginator($newsList);
     $paginator->setItemCountPerPage('5');
     // 获得当前显示的页码
     $page = $this->_request->getParam('page');
     $paginator->setCurrentPageNumber($page);
     // 渲染到视图
     $this->view->newsList = $paginator;
 }
开发者ID:veaglefly,项目名称:BlogCodes,代码行数:24,代码来源:NewsController.php

示例9: getPages

 /**
  * Get a list of visible pages
  */
 public function getPages()
 {
     return \Page::getPages();
 }
开发者ID:blast007,项目名称:bzion,代码行数:7,代码来源:AppGlobal.php

示例10: array

        <div style="width:170px;" class="fl_l">
            <h2>Pages</h2>      
            <div style="height:700px;overflow-y:scroll;border-top:1px dashed #AAA">
            <table cellpadding="0" cellspacing="0" border="0" class="tbl_repeat" style="margin-bottom:0px;">
            <?php 
$groups = $objPage->getGroups('', array('order' => 'asc'));
foreach ($groups as $group) {
    ?>
                <tr  class="groupRow" >
                    <td><strong><?php 
    echo $group['name'];
    ?>
</strong></td>
                </tr>
                <?php 
    $actions = $objPage->getPages(array('group_id' => $group['id']), array('everyone' => 'desc', 'order' => 'asc'));
    foreach ($actions as $action) {
        ?>
                        <tr data-id="<?php 
        echo $action['id'];
        ?>
" class="clickable" >
                            <td >
                                <a href="#"><?php 
        echo ucwords($action['name']);
        ?>
</a>
                            </td>
                        </tr>
                        <?php 
    }
开发者ID:nguyengiangoc,项目名称:SugarKMS,代码行数:31,代码来源:pages.php

示例11: header

<?php

require_once 'lib/path.php';
if ($down || !isset($_SESSION['user'])) {
    header('Location: index.php');
}
$pages = Page::getPages($_SESSION['user']);
?>
<!DOCTYPE html>
<html>
<head>
    <title>Imperial Republic Information Network</title>
    <link rel="shortcut icon" href="favicon.ico" />
    <link href="css/bootstrap.min.css" type="text/css" rel="stylesheet" />
    <link href="css/style.css" type="text/css" rel="stylesheet" />
    <script src="js/jquery.min.js" type="text/javascript"></script>
    <script src="js/jquery.cookie.js" type="text/javascript"></script>
    <script src="js/bootstrap.min.js" type="text/javascript"></script>
    <script src="js/script.js" type="text/javascript"></script>
</head>
<body>
    <div class="container">
        <input type="hidden" id="lastactive" name="lastactive" value="<?php 
if (isset($_SESSION['lastactive'])) {
    echo $_SESSION['lastactive'];
}
?>
" />
        <h1>Imperial Republic Information Network</h1>
        <div class="row">
            <div id="sidebar" class="col-md-3">
开发者ID:Keshaun1222,项目名称:IRIN,代码行数:31,代码来源:main.php

示例12: function

<?php

//region 	<Pages>
// Homepage
$app->get('/', function () use($app) {
    doLessFileCached('index');
    $app->render('index.html.twig', array('pages' => Page::getPages()->find_array()));
});
// Memory Use
$app->get('/memoryUse/', function () use($app) {
    echo "Memory Use: " . memory_get_usage() . "<br>";
    echo "Memory Use Real: " . memory_get_usage(true) . "<br><br>";
    $a = str_repeat("Hello", 4242);
    echo "Memory Use: " . memory_get_usage() . "<br>";
    echo "Memory Use Real: " . memory_get_usage(true);
});
//endregion	</Pages>
//region	<AJAXy & RESTful API>
//endregion	</AJAXy & RESTful API>
// PHPInfo
$app->get('/phpinfo/', function () use($app) {
    phpinfo();
});
// Runs if debug = false
$app->error(function (\Exception $e) use($app) {
    debug($e);
});
开发者ID:ctsstc,项目名称:Lite-Stack-PHP,代码行数:27,代码来源:routing.php

示例13: Page

<?php

require_once '../inc/config.php';
if (isset($_POST['id']) && isset($_POST['everyone'])) {
    $id = $_POST['id'];
    $everyone = $_POST['everyone'];
    $objPage = new Page();
    $action = $objPage->getPages(array('id' => $id));
    if (!empty($action)) {
        switch ($everyone) {
            case 0:
                $mode = 1;
                break;
            case 1:
                $mode = 0;
                break;
            default:
                echo Helper::json(array('success' => false));
        }
        if ($objPage->updateAction(array('everyone' => $mode), $id)) {
            if ($mode == 1) {
                $objPage->removeAllPageAccess($id);
            }
            echo Helper::json(array('success' => true));
        } else {
            echo Helper::json(array('success' => false));
        }
    } else {
        echo Helper::json(array('success' => false));
    }
} else {
开发者ID:nguyengiangoc,项目名称:SugarKMS,代码行数:31,代码来源:changeAccessMode.php

示例14: Page

        <?php 
if (!isset($data['params'])) {
} else {
    $params = $data['params'];
    if (isset($params['id']) && !empty($params['id'])) {
        $id = $params['id'];
        $objPage = new Page();
        $groups = $objPage->getGroups(array('id' => $id));
        if (!empty($groups)) {
            $group = $groups[0];
            $pages = $objPage->getPages(array('group_id' => $id), array('everyone' => 'desc', 'order' => 'asc'));
            ?>
                    
                    <div class="sectionParams" data-params="id=<?php 
            echo $id;
            ?>
"></div>
                        <h2 class="borderBottom">Group :: <?php 
            echo $group['name'];
            ?>
</h2>
                        <br />
                        <strong>Details</strong><br />
                        <table cellpadding="0" cellspacing="0" border="0" class="tbl_repeat" data-object="page_group" style="width:auto;">
                            <tr>
                                <th class="borderRight" style="width:110px;">Group Name</th>
                                <th style="width:90px;">URL cPage</th>
                            </tr>
                            <tr data-id="<?php 
            echo $id;
            ?>
开发者ID:nguyengiangoc,项目名称:SugarKMS,代码行数:31,代码来源:pages_in_group.php

示例15: json_encode

<?php

require_once "classes/class_page.php";
$pages = new Page();
$allPages = $pages->getPages();
echo json_encode($allPages);
开发者ID:Chizbang,项目名称:Portfolio,代码行数:6,代码来源:getpages.php


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