protected $_memTypeSelected;
- /*
+ /**
* Display name of the member
+ *
+ * @var string
*/
protected $_memberDisplayName = NULL;
- /*
- * email of the person paying for the membership (used for receipts)
- */
+ /**
+ * email of the person paying for the membership (used for receipts)
+ */
protected $_memberEmail = NULL;
- /*l43
- * Contact ID of the member
- */
+ /**
+ * Contact ID of the member
+ *
+ * @var int
+ */
public $_contactID = NULL;
- /*
- * Display name of the person paying for the membership (used for receipts)
- */
+ /**
+ * Display name of the person paying for the membership (used for receipts)
+ *
+ * @var string
+ */
protected $_contributorDisplayName = NULL;
- /*
+ /**
* email of the person paying for the membership (used for receipts)
*/
protected $_contributorEmail = NULL;
- /*
- * email of the person paying for the membership (used for receipts)
- */
+ /**
+ * email of the person paying for the membership (used for receipts)
+ *
+ * @var int
+ */
protected $_contributorContactID = NULL;
- /*
+ /**
* ID of the person the receipt is to go to
+ *
+ * @var int
*/
protected $_receiptContactId = NULL;
- /*
+ /**
* Keep a class variable for ALL membeshipID's so
* postProcess hook function can do something with it
+ *
+ * @var array
*/
protected $_membershipIDs = array();
}
if ($this->_context == 'standalone') {
- $this->addEntityRef('contact_id', ts('Contact'), array('create' => TRUE, 'api' => array('extra' => array('email'))), TRUE);
+ $this->addEntityRef('contact_id', ts('Contact'), array(
+ 'create' => TRUE,
+ 'api' => array('extra' => array('email')),
+ ), TRUE);
}
$selOrgMemType[0][0] = $selMemTypeOrg[0] = ts('- select -');
CRM_Core_DAO::getAttribute('CRM_Member_DAO_Membership', 'max_related')
);
- $sel = & $this->addElement('hierselect',
+ $sel = &$this->addElement('hierselect',
'membership_type_id',
ts('Membership Organization and Type'),
$memTypeJs
* @param $self
*
* @throws CiviCRM_API3_Exception
- * @return mixed true or array of errors
- * @static
+ * @return bool|array
+ * mixed true or array of errors
*/
public static function formRule($params, $files, $self) {
$errors = array();
}
if (empty($params['status_id']) || in_array($params['status_id'], $status_ids) == FALSE) {
$errors['status_id'] = ts('Please enter a status that does NOT represent a current membership status.');
- $errors['is_override'] = ts('This must be checked because you set an End Date for a lifetime membership');
+ $errors['is_override'] = ts('This must be checked because you set an End Date for a lifetime membership');
}
}
else {
}
if (isset($params['is_override']) &&
- $params['is_override'] && empty($params['status_id'])) {
+ $params['is_override'] && empty($params['status_id'])
+ ) {
$errors['status_id'] = ts('Please enter the status.');
}
if (!$this->_onlinePendingContributionId) {
if (empty($formValues['source'])) {
- $params['contribution_source'] = ts('%1 Membership: Offline signup (by %2)', array(1 => $membershipType, 2 => $userName));
+ $params['contribution_source'] = ts('%1 Membership: Offline signup (by %2)', array(
+ 1 => $membershipType,
+ 2 => $userName,
+ ));
}
else {
$params['contribution_source'] = $formValues['source'];
* @param object $membership
* Object.
*
- * @return boolean
+ * @return bool
* true if mail was sent successfully
- * @static
*/
public static function emailReceipt(&$form, &$formValues, &$membership) {
// retrieve 'from email id' for acknowledgement