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


PHP CRM_Core_Page::get方法代码示例

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


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

示例1: array

 /**
  * Class constructor
  *
  * @param CRM_Core_Selector_API $object  an object that implements the selector API
  * @param int               $pageID  default pageID
  * @param int               $sortID  default sortID
  * @param int               $action  the actions to potentially support
  * @param CRM_Core_Page|CRM_Core_Form $store   place in session to store some values
  * @param int               $output  what do we so with the output, session/template//both
  *
  * @return Object
  * @access public
  */
 function __construct($object, $pageID, $sortID, $action, $store = NULL, $output = self::TEMPLATE, $prefix = NULL, $case = NULL)
 {
     $this->_object = $object;
     $this->_pageID = $pageID ? $pageID : 1;
     $this->_sortID = $sortID ? $sortID : NULL;
     $this->_action = $action;
     $this->_store = $store;
     $this->_output = $output;
     $this->_prefix = $prefix;
     $this->_case = $case;
     // fix sortID
     if ($this->_sortID && strpos($this->_sortID, '_') === FALSE) {
         $this->_sortID .= '_u';
     }
     $params = array('pageID' => $this->_pageID);
     // let the constructor initialize this, should happen only once
     if (!isset(self::$_template)) {
         self::$_template = CRM_Core_Smarty::singleton();
     }
     $this->_sortOrder =& $this->_object->getSortOrder($action);
     $this->_sort = new CRM_Utils_Sort($this->_sortOrder, $this->_sortID);
     /*
      * if we are in transfer mode, do not goto database, use the
      * session values instead
      */
     if ($output == self::TRANSFER) {
         $params['total'] = $this->_store->get($this->_prefix . 'rowCount');
     } else {
         $params['total'] = $this->_object->getTotalCount($action, $this->_case);
     }
     $this->_total = $params['total'];
     $this->_object->getPagerParams($action, $params);
     /*
      * Set the default values of RowsPerPage
      */
     $storeRowCount = $store->get($this->_prefix . CRM_Utils_Pager::PAGE_ROWCOUNT);
     if ($storeRowCount) {
         $params['rowCount'] = $storeRowCount;
     } elseif (!isset($params['rowCount'])) {
         $params['rowCount'] = CRM_Utils_Pager::ROWCOUNT;
     }
     $this->_pager = new CRM_Utils_Pager($params);
     list($this->_pagerOffset, $this->_pagerRowCount) = $this->_pager->getOffsetAndRowCount();
 }
开发者ID:peteainsworth,项目名称:civicrm-4.2.9-drupal,代码行数:57,代码来源:Controller.php

示例2: array

 /**
  * Class constructor
  *
  * @param CRM_Core_Selector_API $object  an object that implements the selector API
  * @param int               $pageID  default pageID
  * @param int               $sortID  default sortID
  * @param int               $action  the actions to potentially support
  * @param CRM_Core_Page|CRM_Core_Form $store   place in session to store some values
  * @param int               $output  what do we so with the output, session/template//both
  *
  * @return Object
  * @access public
  */
 function CRM_Core_Selector_Controller($object, $pageID, $sortID, $action, $store = null, $output = CRM_CORE_SELECTOR_CONTROLLER_TEMPLATE)
 {
     $this->_object = $object;
     $this->_pageID = $pageID ? $pageID : 1;
     $this->_sortID = $sortID ? $sortID : null;
     $this->_action = $action;
     $this->_store = $store;
     $this->_output = $output;
     // fix sortID
     if ($this->_sortID && strpos($this->_sortID, '_') === false) {
         $this->_sortID .= '_u';
     }
     $params = array('pageID' => $this->_pageID);
     // let the constructor initialize this, should happen only once
     if (!isset($GLOBALS['_CRM_CORE_SELECTOR_CONTROLLER']['_template'])) {
         $GLOBALS['_CRM_CORE_SELECTOR_CONTROLLER']['_template'] =& CRM_Core_Smarty::singleton();
     }
     $this->_sortOrder =& $this->_object->getSortOrder($action);
     $this->_sort =& new CRM_Utils_Sort($this->_sortOrder, $this->_sortID);
     /*
      * if we are in transfer mode, do not goto database, use the 
      * session values instead
      */
     if ($output == CRM_CORE_SELECTOR_CONTROLLER_TRANSFER) {
         $params['total'] = $this->_store->get('rowCount');
     } else {
         $params['total'] = $this->_object->getTotalCount($action);
     }
     $this->_total = $params['total'];
     $this->_object->getPagerParams($action, $params);
     /*
      * Set the default values of RowsPerPage
      */
     $storeRowCount = $store->get(CRM_UTILS_PAGER_PAGE_ROWCOUNT);
     if ($storeRowCount) {
         $params['rowCount'] = $storeRowCount;
     } else {
         if (!isset($params['rowCount'])) {
             $params['rowCount'] = CRM_UTILS_PAGER_ROWCOUNT;
         }
     }
     $this->_pager =& new CRM_Utils_Pager($params);
     list($this->_pagerOffset, $this->_pagerRowCount) = $this->_pager->getOffsetAndRowCount();
 }
开发者ID:bhirsch,项目名称:voipdrupal-4.7-1.0,代码行数:57,代码来源:Controller.php


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