Merge remote-tracking branch 'upstream/4.5' into 4.5-4.6-2015-04-13-16-08-08
[civicrm-core.git] / CRM / PCP / Page / PCP.php
index dfa2d43015eff508788ec7960487c7441e10042c..133f4bdf437326effd9f82201b490bfcece79608 100644 (file)
@@ -3,7 +3,7 @@
  +--------------------------------------------------------------------+
  | CiviCRM version 4.6                                                |
  +--------------------------------------------------------------------+
- | Copyright CiviCRM LLC (c) 2004-2014                                |
+ | Copyright CiviCRM LLC (c) 2004-2015                                |
  +--------------------------------------------------------------------+
  | This file is a part of CiviCRM.                                    |
  |                                                                    |
  | GNU Affero General Public License or the licensing of CiviCRM,     |
  | see the CiviCRM license FAQ at http://civicrm.org/licensing        |
  +--------------------------------------------------------------------+
-*/
+ */
 
 /**
  *
  * @package CRM
- * @copyright CiviCRM LLC (c) 2004-2014
+ * @copyright CiviCRM LLC (c) 2004-2015
  * $Id$
  *
  */
 class CRM_PCP_Page_PCP extends CRM_Core_Page_Basic {
 
   /**
-   * The action links that we need to display for the browse screen
+   * The action links that we need to display for the browse screen.
    *
    * @var array
-   * @static
    */
   static $_links = NULL;
 
   /**
-   * Get BAO Name
+   * Get BAO Name.
    *
-   * @return string Classname of BAO.
+   * @return string
+   *   Classname of BAO.
    */
-  function getBAOName() {
+  public function getBAOName() {
     return 'CRM_PCP_BAO_PCP';
   }
 
   /**
-   * Get action Links
+   * Get action Links.
    *
-   * @return array (reference) of action links
+   * @return array
+   *   (reference) of action links
    */
-  function &links() {
+  public function &links() {
     if (!(self::$_links)) {
       // helper variable for nicer formatting
       $deleteExtra = ts('Are you sure you want to delete this Campaign Page ?');
@@ -91,12 +92,14 @@ class CRM_PCP_Page_PCP extends CRM_Core_Page_Basic {
           'extra' => 'onclick = "return confirm(\'' . $deleteExtra . '\');"',
           'title' => ts('Delete Personal Campaign Page'),
         ),
-        CRM_Core_Action::ENABLE => array('name' => ts('Enable'),
+        CRM_Core_Action::ENABLE => array(
+          'name' => ts('Enable'),
           'url' => 'civicrm/admin/pcp',
           'qs' => 'action=enable&id=%%id%%',
           'title' => ts('Enable'),
         ),
-        CRM_Core_Action::DISABLE => array('name' => ts('Disable'),
+        CRM_Core_Action::DISABLE => array(
+          'name' => ts('Disable'),
           'url' => 'civicrm/admin/pcp',
           'qs' => 'action=disable&id=%%id%%',
           'title' => ts('Disable'),
@@ -116,9 +119,8 @@ class CRM_PCP_Page_PCP extends CRM_Core_Page_Basic {
    * @param
    *
    * @return void
-   * @access public
    */
-  function run() {
+  public function run() {
     // get the requested action
     $action = CRM_Utils_Request::retrieve('action', 'String',
       $this, FALSE,
@@ -164,10 +166,8 @@ class CRM_PCP_Page_PCP extends CRM_Core_Page_Basic {
    * @param null $action
    *
    * @return void
-   * @access public
-   * @static
    */
-  function browse($action = NULL) {
+  public function browse($action = NULL) {
     $this->_sortByCharacter = CRM_Utils_Request::retrieve('sortByCharacter',
       'String',
       $this
@@ -178,7 +178,6 @@ class CRM_PCP_Page_PCP extends CRM_Core_Page_Basic {
       $this->_sortByCharacter = '';
     }
 
-
     $status = CRM_PCP_BAO_PCP::buildOptions('status_id', 'create');
 
     $pcpSummary = $params = array();
@@ -343,7 +342,7 @@ class CRM_PCP_Page_PCP extends CRM_Core_Page_Basic {
     }
   }
 
-  function search() {
+  public function search() {
 
     if ($this->_action & CRM_Core_Action::DELETE) {
       return;
@@ -357,20 +356,22 @@ class CRM_PCP_Page_PCP extends CRM_Core_Page_Basic {
   }
 
   /**
-   * Get name of edit form
+   * Get name of edit form.
    *
-   * @return string Classname of edit form.
+   * @return string
+   *   Classname of edit form.
    */
-  function editForm() {
+  public function editForm() {
     return 'CRM_PCP_Form_PCP';
   }
 
   /**
-   * Get edit form name
+   * Get edit form name.
    *
-   * @return string name of this page.
+   * @return string
+   *   name of this page.
    */
-  function editName() {
+  public function editName() {
     return ts('Personal Campaign Page');
   }
 
@@ -379,18 +380,19 @@ class CRM_PCP_Page_PCP extends CRM_Core_Page_Basic {
    *
    * @param null $mode
    *
-   * @return string user context.
+   * @return string
+   *   user context.
    */
-  function userContext($mode = NULL) {
+  public function userContext($mode = NULL) {
     return 'civicrm/admin/pcp';
   }
 
-  //@TODO this function changed, debug this at runtime
   /**
+   * @TODO this function changed, debug this at runtime
    * @param $whereClause
    * @param array $whereParams
    */
-  function pagerAtoZ($whereClause, $whereParams) {
+  public function pagerAtoZ($whereClause, $whereParams) {
     $where = '';
     if ($whereClause) {
       if (strpos($whereClause, ' AND') == 0) {
@@ -411,5 +413,5 @@ class CRM_PCP_Page_PCP extends CRM_Core_Page_Basic {
     $aToZBar = CRM_Utils_PagerAToZ::getAToZBar($dao, $this->_sortByCharacter, TRUE);
     $this->assign('aToZ', $aToZBar);
   }
-}
 
+}