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


PHP ResultPrinter::startingNumberParam方法代码示例

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


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

示例1: registerState

 /**
  * Register the search and page state of this collection so that the
  * next time that we return to it, we will get the same view.
  * 
  * @return void
  * @access public
  * @since 5/11/06
  */
 function registerState()
 {
     $this->_state = $this->getState($this->getAssetId());
     // unset our starting number if we have the new search terms
     if (RequestContext::value('form_submitted') || isset($_REQUEST[ResultPrinter::startingNumberParam()]) || !isset($this->_state['numPerPage']) || $this->_state['numPerPage'] != $_SESSION['assets_per_page']) {
         $this->_state['startingNumber'] = ResultPrinter::startingNumberParam();
         $this->_state['numPerPage'] = $_SESSION['assets_per_page'];
     } else {
         if (!isset($this->_state['startingNumber'])) {
             $this->_state['startingNumber'] = 1;
             $this->_state['numPerPage'] = $_SESSION['assets_per_page'];
         }
     }
 }
开发者ID:adamfranco,项目名称:concerto,代码行数:22,代码来源:browseAsset.act.php

示例2: registerState

 /**
  * Register the search and page state of this collection so that the
  * next time that we return to it, we will get the same view.
  * 
  * @return void
  * @access public
  * @since 5/11/06
  */
 function registerState()
 {
     $this->_state = $this->getState($this->getRepositoryId());
     // top-level properties
     $properties = array('limit_by_type' => 'false');
     foreach ($properties as $name => $default) {
         if (RequestContext::value('form_submitted')) {
             $this->_state[$name] = RequestContext::value($name);
         } else {
             if (!isset($this->_state[$name])) {
                 $this->_state[$name] = $default;
             }
         }
     }
     // Search type
     if (RequestContext::value('searchtype')) {
         $this->_state['searchtype'] = HarmoniType::fromString(RequestContext::value('searchtype'));
     } else {
         if (!isset($this->_state['searchtype'])) {
             $this->_state['searchtype'] = new Type("Repository", "edu.middlebury.harmoni", "Keyword", "Search with a string for keywords.");
         }
     }
     // Search Criteria
     $searchModuleManager = Services::getService("RepositorySearchModules");
     if (RequestContext::value('form_submitted')) {
         $this->_state['currentSearchValues'] = $searchModuleManager->getCurrentValues($this->_state['searchtype']);
     } else {
         if (isset($this->_state['currentSearchValues'])) {
             $searchModuleManager->setCurrentValues($this->_state['searchtype'], $this->_state['currentSearchValues']);
         }
     }
     // if we are limiting by type
     if ($this->_state["limit_by_type"] == 'true') {
         if (!isset($this->_state["selectedTypes"])) {
             $this->_state["selectedTypes"] = array();
         }
         $repository = $this->getRepository();
         $types = $repository->getAssetTypes();
         while ($types->hasNext()) {
             $type = $types->next();
             if (RequestContext::value("type___" . $type->asString()) == 'true') {
                 $this->_state["selectedTypes"][$type->asString()] = $type;
             } else {
                 if (RequestContext::value('form_submitted')) {
                     unset($this->_state["selectedTypes"][$type->asString()]);
                 }
             }
         }
     }
     // unset our starting number if we have the new search terms
     if (RequestContext::value('form_submitted') || isset($_REQUEST[ResultPrinter::startingNumberParam()]) || !isset($this->_state['numPerPage']) || $this->_state['numPerPage'] != $_SESSION['assets_per_page']) {
         if (isset($_REQUEST[ResultPrinter::startingNumberParam()])) {
             $this->_state['startingNumber'] = $_REQUEST[ResultPrinter::startingNumberParam()];
         } else {
             $this->_state['startingNumber'] = 1;
         }
         $this->_state['numPerPage'] = $_SESSION['assets_per_page'];
     } else {
         if (!isset($this->_state['startingNumber'])) {
             $this->_state['startingNumber'] = 1;
             $this->_state['numPerPage'] = $_SESSION['assets_per_page'];
         }
     }
 }
开发者ID:adamfranco,项目名称:concerto,代码行数:72,代码来源:browse.act.php


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