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


PHP Pages::fetchAll方法代码示例

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


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

示例1: indexAction

 function indexAction()
 {
     echo "<p>in AdminController::indexAction()</p>";
     $this->view->title = "Panel Administracyjny";
     $pages = new Pages();
     $this->view->pages = $pages->fetchAll();
     if (!isset($_REQUEST['login_msg'])) {
         $_REQUEST['login_msg'] = 'permissiondenied';
     }
 }
开发者ID:stasiu38,项目名称:cms,代码行数:10,代码来源:AdminController.php

示例2: indexAction

 function indexAction()
 {
     $this->view->baseUrl = $this->_request->getBaseUrl();
     $this->view->title = "Wirtulna Biblioteka";
     $pages = new Pages();
     $this->view->pages = $pages->fetchAll();
     $strony = new Strony();
     $this->view->strony = $strony->fetchAll();
     $wtyczka = new Wtyczka();
     $this->view->wtyczka = $wtyczka->fetchAll();
 }
开发者ID:stasiu38,项目名称:cms,代码行数:11,代码来源:IndexController.php

示例3: autogenerateMenuItemFromPageId

 private function autogenerateMenuItemFromPageId($itemId, $parentId, $recursive = false)
 {
     $pageObject = new Pages();
     $select = $pageObject->select()->setIntegrityCheck(false)->from('Pages')->joinInner('PagesIndex', 'PI_PageID = P_ID')->where('PI_LanguageID = ?', Zend_Registry::get('languageID'))->where('P_ParentID = ?', $parentId)->order('P_Position');
     $pages = $pageObject->fetchAll($select)->toArray();
     foreach ($pages as $item) {
         $page_id = $item['P_ID'];
         $position = $this->_db->fetchCol("SELECT count(*) FROM MenuItemData WHERE MID_ParentID = '{$itemId}' AND MID_MenuID = '{$this->_id}'");
         $position = $position[0];
         $langs = Cible_FunctionsGeneral::getAllLanguage();
         foreach ($langs as $lang) {
             $page_details = Cible_FunctionsPages::getPageDetails($page_id, $lang['L_ID']);
             $page_title = !empty($page_details['PI_PageTitle']) ? $page_details['PI_PageTitle'] : null;
             if ($page_title != null) {
                 $found_status = $this->autogenerate_checkIfAlreadyExists($itemId, $page_id, $lang['L_ID']);
                 if (!$found_status['data']) {
                     $menuData = new MenuItem();
                     $_data = $menuData->createRow();
                     $_data->setFromArray(array('MID_MenuID' => $this->_id, 'MID_ParentID' => $itemId, 'MID_Position' => $position));
                     $_data->save();
                     $_dataId = $this->_db->lastInsertId();
                     $menuIndex = new MenuItemIndex();
                     $_index = $menuIndex->createRow();
                     $_index->setFromArray(array('MII_LanguageID' => $item['PI_LanguageID'], 'MII_MenuItemDataID' => $_dataId, 'MII_Title' => $page_title, 'MII_Link' => '', 'MII_PageID' => $page_id));
                     $_index->save();
                 } else {
                     if ($found_status['data'] && !$found_status['lang']) {
                         $_dataId = $found_status['dataID'];
                         $menuIndex = new MenuItemIndex();
                         $_index = $menuIndex->createRow();
                         $_index->setFromArray(array('MII_LanguageID' => $lang['L_ID'], 'MII_MenuItemDataID' => $_dataId, 'MII_Title' => $page_title, 'MII_Link' => '', 'MII_PageID' => $page_id));
                         $_index->save();
                     }
                 }
             }
         }
         if ($_dataId != -1 && $recursive) {
             $this->autogenerateMenuItemFromPageId($_dataId, $page_id, $recursive);
         }
     }
 }
开发者ID:anunay,项目名称:stentors,代码行数:41,代码来源:MenuObject.php

示例4: findChildPage

 public static function findChildPage($ParentID, $lang = null)
 {
     if ($lang == null) {
         $lang = Zend_Registry::get("languageID");
     }
     $childArray = new Pages();
     $select = $childArray->select()->setIntegrityCheck(false)->from('Pages')->join('PagesIndex', 'Pages.P_ID = PagesIndex.PI_PageID')->where('Pages.P_ParentID = ?', $ParentID)->where('PagesIndex.PI_LanguageID = ?', $lang)->order('Pages.P_Position');
     return $childArray->fetchAll($select);
 }
开发者ID:anunay,项目名称:stentors,代码行数:9,代码来源:FunctionsPages.php


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