<?php
/*
+--------------------------------------------------------------------+
- | CiviCRM version 4.5 |
+ | CiviCRM version 4.6 |
+--------------------------------------------------------------------+
| Copyright CiviCRM LLC (c) 2004-2014 |
+--------------------------------------------------------------------+
/**
* Constants for number of options for data types of multiple option.
*/
- CONST NUM_OPTION = 15;
+ const NUM_OPTION = 15;
/**
- * the custom set id saved to the session for an update
+ * The custom set id saved to the session for an update
*
* @var int
* @access protected
protected $_extendComponentId;
/**
- * variable is set if price set is used for membership
+ * Variable is set if price set is used for membership
* @access protected
*/
protected $_useForMember;
/**
- * Function to set variables up before form is built
+ * Set variables up before form is built
*
* @param null
*
CRM_Utils_System::appendBreadCrumb($breadCrumb);
- switch ($this->_action) {
- case CRM_Core_Action::ADD:
- CRM_Utils_System::setTitle(ts('Add Price Field'));
- break;
- case CRM_Core_Action::UPDATE:
- CRM_Utils_System::setTitle(ts('Edit Price Field'));
- break;
- case CRM_Core_Action::DELETE:
- CRM_Utils_System::setTitle(ts('Delete Price Field'));
- break;
- }
+ $this->setPageTitle(ts('Price Field'));
}
/**
- * This function sets the default values for the form. Note that in edit/view mode
+ * Set default values for the form. Note that in edit/view mode
* the default values are retrieved from the database
*
* @param null
}
/**
- * Function to actually build the form
+ * Build the form object
*
* @param null
*
array(
'' => ' ') + $membershipTypes, FALSE, $js
);
- $this->add('text', 'membership_num_terms[' . $i . ']', ts('Number of terms'), CRM_Utils_Array::value('membership_num_terms', $attributes));
+ $this->add('text', 'membership_num_terms[' . $i . ']', ts('Number of Terms'), CRM_Utils_Array::value('membership_num_terms', $attributes));
}
// weight
}
/**
- * global validation rules for the form
+ * Global validation rules for the form
*
- * @param array $fields (referance) posted values of the form
+ * @param array $fields posted values of the form
*
* @param $files
- * @param $form
+ * @param CRM_Core_Form $form
*
* @return array if errors then list of errors to be posted back to the form,
* true otherwise