Merge pull request #3644 from eileenmcnaughton/e-notice-ps
[civicrm-core.git] / CRM / Utils / Pager.php
index eb8636956f614f8474c72758d459c91dfd7ab4d9..cc92c5b397dfbe389327cb3f3cc8d503e492ed25 100644 (file)
  */
 
 require_once 'Pager/Sliding.php';
+
+/**
+ * Class CRM_Utils_Pager
+ */
 class CRM_Utils_Pager extends Pager_Sliding {
 
   /**
@@ -64,18 +68,17 @@ 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) {
@@ -187,11 +190,12 @@ class CRM_Utils_Pager extends Pager_Sliding {
    * 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
@@ -261,12 +265,18 @@ class CRM_Utils_Pager extends Pager_Sliding {
     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 '';
@@ -280,6 +290,9 @@ class CRM_Utils_Pager extends Pager_Sliding {
     ) . $this->_spacesBefore . $this->_spacesAfter;
   }
 
+  /**
+   * @return string
+   */
   function getLastPageLink() {
     if ($this->isLastPage()) {
       return '';
@@ -293,6 +306,9 @@ class CRM_Utils_Pager extends Pager_Sliding {
     );
   }
 
+  /**
+   * @return string
+   */
   function getBackPageLink() {
     if ($this->_currentPage > 1) {
       $href = $this->makeURL(self::PAGE_ID, $this->getPreviousPageID());
@@ -304,6 +320,9 @@ class CRM_Utils_Pager extends Pager_Sliding {
     return '';
   }
 
+  /**
+   * @return string
+   */
   function getNextPageLink() {
     if ($this->_currentPage < $this->_totalPages) {
       $href = $this->makeURL(self::PAGE_ID, $this->getNextPageID());