class CRM_Price_BAO_PriceSet extends CRM_Price_DAO_PriceSet {
/**
- * static field for default price set details
+ * Static field for default price set details
*
* @var array
* @static
static $_defaultPriceSet = NULL;
/**
- * class constructor
+ * Class constructor
*/
function __construct() {
parent::__construct();
}
/**
- * takes an associative array and creates a price set object
+ * Takes an associative array and creates a price set object
*
* @param array $params (reference) an assoc array of name/value pairs
*
}
/**
- * update the is_active flag in the db
+ * Update the is_active flag in the db
*
* @param int $id id of the database record
* @param $isActive
*
* An array containing price set details (including price fields) is returned
*
- * @param $setID
+ * @param int $setID
* @param bool $required
* @param bool $validOnly
*
/**
* @param CRM_Core_Form $form
- * @param $id
+ * @param int $id
* @param string $entityTable
* @param bool $validOnly
- * @param null $priceSetId
+ * @param int $priceSetId
*
* @return bool|false|int|null
*/
}
/**
- * build the price set form.
+ * Build the price set form.
*
* @param CRM_Core_Form $form
*
*/
static function buildPriceSet(&$form) {
$priceSetId = $form->get('priceSetId');
- $userid = $form->getVar('_userID');
if (!$priceSetId) {
return;
}
) {
$options = CRM_Utils_Array::value('options', $field);
if ($className == 'CRM_Contribute_Form_Contribution_Main' && $component = 'membership') {
+ $userid = $form->getVar('_membershipContactID');
$checklifetime = self::checkCurrentMembership($options, $userid);
if ($checklifetime) {
$form->assign('ispricelifetime', TRUE);
}
/**
- * check the current Membership
+ * Check the current Membership
* having end date null.
*/
static function checkCurrentMembership(&$options, $userid) {
}
/**
- * set daefult the price set fields.
+ * Set daefult the price set fields.
*
* @param CRM_Core_Form $form
* @param $defaults
}
/**
- * Function to check if auto renew option should be shown
+ * Check if auto renew option should be shown
*
* @param int $priceSetId price set id
*
}
/**
- * Function to retrieve auto renew frequency and interval
+ * Retrieve auto renew frequency and interval
*
* @param int $priceSetId price set id
*
}
/**
- * update the is_quick_config flag in the db
+ * Update the is_quick_config flag in the db
*
* @param int $id id of the database record
* @param boolean $isQuickConfig value we want to set the is_quick_config field