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


PHP PageList::getNext方法代码示例

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


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

示例1: deleteEntry

 /**
  * function deleteEntry
  * <pre>
  * Removes the child entries of Module objects before removing self. 
  * (Poor Man's Referential Integrity)
  * </pre>
  * @return [void]
  */
 function deleteEntry()
 {
     // first remove any associated State Variables
     $list = new StateVarList($this->getModuleID());
     $list->setFirst();
     while ($item = $list->getNext()) {
         $item->deleteEntry();
     }
     // now remove any Data Access Objects
     $list = new DAObjList($this->getModuleID());
     $list->setFirst();
     while ($item = $list->getNext()) {
         $item->deleteEntry();
     }
     // now remove any Page Objects
     $list = new PageList($this->getModuleID());
     $list->setFirst();
     while ($item = $list->getNext()) {
         $item->deleteEntry();
     }
     // now remove any Transitions
     $list = new TransitionsList($this->getModuleID());
     $list->setFirst();
     while ($item = $list->getNext()) {
         $item->deleteEntry();
     }
     // now call parent method
     parent::deleteEntry();
 }
开发者ID:andrewroth,项目名称:c4c_intranet,代码行数:37,代码来源:ModuleManager.php

示例2: processPageInfo

 /**
  * function processPageInfo
  * <pre>
  * Takes the Page info and creates the proper objects_bl/ pages, updates
  * app_Module with the proper initialization info.
  * </pre>
  * @param $moduleID [INTEGER] The module id of the Pages to work with
  * @return [void]
  */
 function processPageInfo($moduleID)
 {
     // open include file
     $key = ModuleCreator::KEY_PATH_INCLUDE_NAME;
     $includeFileName = $this->values[$key];
     $includeFileContents = file_get_contents($includeFileName);
     // open app file
     $appFileName = $this->values[ModuleCreator::KEY_PATH_APP_NAME];
     $appFileContents = file_get_contents($appFileName);
     $pageList = new PageList($moduleID);
     // for each page
     $pageList->setFirst();
     while ($page = $pageList->getNext()) {
         // if page not already created
         if (!$page->isCreated()) {
             // open page template based on page type
             $templateContents = $this->getTemplate($page);
             // replace TAGS
             $this->replaceTemplateTags($page, $templateContents);
             // store data as new object bl file
             $blPath = $this->values[ModuleCreator::KEY_PATH_MODULE_PAGES];
             $name = 'page_' . $page->getPageName() . '.php';
             file_put_contents($blPath . $name, $templateContents);
             // include new file in include file
             $tag = ModuleCreator::TAG_INCLUDE_PAGES;
             $data = "require_once( '" . ModuleCreator::PATH_OBJECT_PAGES . $name . "' );\n";
             $data .= $tag;
             $includeFileContents = str_replace($tag, $data, $includeFileContents);
             // update page info in app file
             $this->updatePageAppInfo($page, $appFileContents);
             // prepare the tool setup file to receive labels for this page.
             $this->preparePageLabels($page);
             // if page is a custom template then
             if ($page->isCustom()) {
                 $this->transferCustomTemplate($page);
             }
             // end if
             // Mark this page as having been created
             $page->setCreated();
         }
         // end if
         // NOTE: we update a page labels even if a page has already been
         // created.  If there are new labels, they will be added to the
         // list.
         // update page labels
         $this->updatePageLabels($page);
     }
     // next page
     // save include file
     file_put_contents($includeFileName, $includeFileContents);
     // save app file
     file_put_contents($appFileName, $appFileContents);
 }
开发者ID:andrewroth,项目名称:c4c_intranet,代码行数:62,代码来源:ModuleCreator.php


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