<?php
/*
+--------------------------------------------------------------------+
- | CiviCRM version 4.4 |
+ | CiviCRM version 4.5 |
+--------------------------------------------------------------------+
- | Copyright CiviCRM LLC (c) 2004-2013 |
+ | Copyright CiviCRM LLC (c) 2004-2014 |
+--------------------------------------------------------------------+
| This file is a part of CiviCRM. |
| |
/**
*
* @package CRM
- * @copyright CiviCRM LLC (c) 2004-2013
+ * @copyright CiviCRM LLC (c) 2004-2014
* $Id$
*
*/
*/
require_once 'Pager/Sliding.php';
+
+/**
+ * Class CRM_Utils_Pager
+ */
class CRM_Utils_Pager extends Pager_Sliding {
/**
* We have embedded some html in this class. Need to figure out how to export this
* to the top level at some point in time
*
- * @param int total the total count of items to be displayed
- * @param int currentPage the page currently being displayed
- * @param string status the status message to be displayed. It embeds a token
+ * @param $params
+ *
+ * @internal param \total $int the total count of items to be displayed
+ * @internal param \currentPage $int the page currently being displayed
+ * @internal param \status $string the status message to be displayed. It embeds a token
* %%statusMessage%% that will be replaced with which items
* are currently being displayed
- * @param string csvString the title of the link to be displayed for the export
- * @param int perPage the number of items displayed per page
- *
- * @return object the newly created and initialized pager object
- *
- * @access public
+ * @internal param \csvString $string the title of the link to be displayed for the export
+ * @internal param \perPage $int the number of items displayed per page
*
+ * @return \CRM_Utils_Pager the newly created and initialized pager object@access public
*/
function __construct($params) {
if ($params['status'] === NULL) {
* POST over-rides a GET, a POST at the top overrides
* a POST at the bottom (of the page)
*
- * @param int defaultPageId current pageId
+ * @param int $defaultPageId defaultPageId current pageId
+ *
+ * @param $params
*
* @return int new pageId to display to the user
* @access public
- *
*/
function getPageID($defaultPageId = 1, &$params) {
// POST has higher priority than GET vars
return array($offset, $this->_perPage);
}
+ /**
+ * @return string
+ */
function getCurrentLocation() {
$config = CRM_Core_Config::singleton();
$path = CRM_Utils_Array::value($config->userFrameworkURLVar, $_GET);
return CRM_Utils_System::url($path, CRM_Utils_System::getLinksUrl(self::PAGE_ID, FALSE, TRUE), FALSE, NULL, FALSE) . $this->getCurrentPageID();
}
+ /**
+ * @return string
+ */
function getFirstPageLink() {
if ($this->isFirstPage()) {
return '';
) . $this->_spacesBefore . $this->_spacesAfter;
}
+ /**
+ * @return string
+ */
function getLastPageLink() {
if ($this->isLastPage()) {
return '';
);
}
+ /**
+ * @return string
+ */
function getBackPageLink() {
if ($this->_currentPage > 1) {
$href = $this->makeURL(self::PAGE_ID, $this->getPreviousPageID());
return '';
}
+ /**
+ * @return string
+ */
function getNextPageLink() {
if ($this->_currentPage < $this->_totalPages) {
$href = $this->makeURL(self::PAGE_ID, $this->getNextPageID());