Merge pull request #4771 from pratikshad/CRM-15409
[civicrm-core.git] / CRM / Member / Form / MembershipType.php
index 4cca8ce15d5ac581b042d85d5b363af5a6d55696..5d66bf803c8f302727512ca52b0f9355d751a334 100644 (file)
@@ -1,7 +1,7 @@
 <?php
 /*
  +--------------------------------------------------------------------+
- | CiviCRM version 4.5                                                |
+ | CiviCRM version 4.6                                                |
  +--------------------------------------------------------------------+
  | Copyright CiviCRM LLC (c) 2004-2014                                |
  +--------------------------------------------------------------------+
  * This class generates form components for Membership Type
  *
  */
-class CRM_Member_Form_MembershipType extends CRM_Member_Form {
+class CRM_Member_Form_MembershipType extends CRM_Member_Form_MembershipConfig {
 
   /**
-   * max number of contacts we will display for membership-organisation
+   * Max number of contacts we will display for membership-organisation
    */
   CONST MAX_CONTACTS = 50;
 
@@ -58,7 +58,7 @@ class CRM_Member_Form_MembershipType extends CRM_Member_Form {
   }
 
   /**
-   * This function sets the default values for the form. MobileProvider that in edit/view mode
+   * Set default values for the form. MobileProvider that in edit/view mode
    * the default values are retrieved from the database
    *
    * @access public
@@ -108,7 +108,7 @@ class CRM_Member_Form_MembershipType extends CRM_Member_Form {
   }
 
   /**
-   * Function to build the form
+   * Build the form object
    *
    * @return void
    * @access public
@@ -212,7 +212,7 @@ class CRM_Member_Form_MembershipType extends CRM_Member_Form {
   }
 
   /**
-   * Function for validation
+   * Validation
    *
    * @param array $params (ref.) an assoc array of name/value pairs
    *
@@ -228,7 +228,7 @@ class CRM_Member_Form_MembershipType extends CRM_Member_Form {
     }
 
     if (($params['minimum_fee'] > 0 ) && !$params['financial_type_id'] ) {
-      $errors['financial_type_id'] = ts('Please enter the financial type.');
+      $errors['financial_type_id'] = ts('Please enter the financial Type.');
     }
 
     if (empty($params['duration_interval']) and $params['duration_unit'] != 'lifetime') {
@@ -289,7 +289,7 @@ class CRM_Member_Form_MembershipType extends CRM_Member_Form {
   }
 
   /**
-   * Function to process the form
+   * Process the form submission
    *
    * @access public
    *
@@ -415,9 +415,9 @@ class CRM_Member_Form_MembershipType extends CRM_Member_Form {
   }
 
   /**
-   * @param $previousID
-   * @param $priceSetId
-   * @param $membershipTypeId
+   * @param int $previousID
+   * @param int $priceSetId
+   * @param int $membershipTypeId
    * @param $optionsIds
    */
   public static function checkPreviousPriceField($previousID, $priceSetId, $membershipTypeId, &$optionsIds) {