Merge pull request #4931 from davecivicrm/INFRA-132
[civicrm-core.git] / CRM / Contribute / Page / ManagePremiums.php
index e9e8d3de0c83b5901b559385d92d2f7bd92fdb5c..17cf09472d67ec7cd1b7e6f4783717ce981bb698 100644 (file)
@@ -1,7 +1,7 @@
 <?php
 /*
  +--------------------------------------------------------------------+
- | CiviCRM version 4.5                                                |
+ | CiviCRM version 4.6                                                |
  +--------------------------------------------------------------------+
  | Copyright CiviCRM LLC (c) 2004-2014                                |
  +--------------------------------------------------------------------+
@@ -44,25 +44,26 @@ class CRM_Contribute_Page_ManagePremiums extends CRM_Core_Page_Basic {
    * The action links that we need to display for the browse screen
    *
    * @var array
-   * @static
    */
   static $_links = NULL;
 
   /**
    * Get BAO Name
    *
-   * @return string Classname of BAO.
+   * @return string
+   *   Classname of BAO.
    */
-  function getBAOName() {
+  public function getBAOName() {
     return 'CRM_Contribute_BAO_ManagePremiums';
   }
 
   /**
    * Get action Links
    *
-   * @return array (reference) of action links
+   * @return array
+   *   (reference) of action links
    */
-  function &links() {
+  public function &links() {
     if (!(self::$_links)) {
       self::$_links = array(
         CRM_Core_Action::UPDATE => array(
@@ -106,10 +107,8 @@ class CRM_Contribute_Page_ManagePremiums extends CRM_Core_Page_Basic {
    * Finally it calls the parent's run method.
    *
    * @return void
-   * @access public
-   *
    */
-  function run() {
+  public function run() {
 
     // get the requested action
     $action = CRM_Utils_Request::retrieve('action', 'String',
@@ -139,10 +138,8 @@ class CRM_Contribute_Page_ManagePremiums extends CRM_Core_Page_Basic {
    *
    *
    * @return void
-   * @access public
-   * @static
    */
-  function browse() {
+  public function browse() {
     // get all custom groups sorted by weight
     $premiums = array();
     $dao = new CRM_Contribute_DAO_Product();
@@ -155,7 +152,6 @@ class CRM_Contribute_Page_ManagePremiums extends CRM_Core_Page_Basic {
       // form all action links
       $action = array_sum(array_keys($this->links()));
 
-
       if ($dao->is_active) {
         $action -= CRM_Core_Action::ENABLE;
       }
@@ -172,30 +168,32 @@ class CRM_Contribute_Page_ManagePremiums extends CRM_Core_Page_Basic {
         'Premium',
         $dao->id
       );
-           //Financial Type
-                if( !empty( $dao->financial_type_id )  ){
-                    require_once 'CRM/Core/DAO.php';
-                    $premiums[$dao->id]['financial_type_id'] = CRM_Core_DAO::getFieldValue( 'CRM_Financial_DAO_FinancialType', $dao->financial_type_id, 'name' );
+      //Financial Type
+      if (!empty($dao->financial_type_id)) {
+        require_once 'CRM/Core/DAO.php';
+        $premiums[$dao->id]['financial_type_id'] = CRM_Core_DAO::getFieldValue('CRM_Financial_DAO_FinancialType', $dao->financial_type_id, 'name');
+      }
     }
-        }
     $this->assign('rows', $premiums);
   }
 
   /**
    * Get name of edit form
    *
-   * @return string Classname of edit form.
+   * @return string
+   *   Classname of edit form.
    */
-  function editForm() {
+  public function editForm() {
     return 'CRM_Contribute_Form_ManagePremiums';
   }
 
   /**
    * Get edit form name
    *
-   * @return string name of this page.
+   * @return string
+   *   name of this page.
    */
-  function editName() {
+  public function editName() {
     return 'Manage Premiums';
   }
 
@@ -204,10 +202,10 @@ class CRM_Contribute_Page_ManagePremiums 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/contribute/managePremiums';
   }
 }
-