* @param bool $is_active
* Value we want to set the is_active field.
*
- * @return Object DAO object on sucess, null otherwise
+ * @return Object
+ * DAO object on sucess, null otherwise
* @static
*/
public static function setIsActive($id, $is_active) {
* @param int $numRenewTerms
* How many membership terms are being added to end date (default is 1).
*
- * @return array associated array with start date, end date and join date for the membership
+ * @return array
+ * associated array with start date, end date and join date for the membership
* @static
*/
public static function getDatesForMembershipType($membershipTypeId, $joinDate = NULL, $startDate = NULL, $endDate = NULL, $numRenewTerms = 1) {
*
* CRM-7297 Membership Upsell - Added $membershipTypeID param to facilitate calculations of dates when membership type changes
*
- * @return Array array fo the start date, end date and join date of the membership
+ * @return Array
+ * array fo the start date, end date and join date of the membership
* @static
*/
public static function getRenewalDatesForMembershipType($membershipId, $changeToday = NULL, $membershipTypeID = NULL, $numRenewTerms = 1) {
switch ($membershipTypeDetails['duration_unit']) {
case 'year':
//need to check if the upsell is from rolling to fixed and adjust accordingly
- if ($membershipTypeDetails['period_type'] == 'fixed' && $oldPeriodType == 'rolling' ) {
+ if ($membershipTypeDetails['period_type'] == 'fixed' && $oldPeriodType == 'rolling') {
$month = substr($membershipTypeDetails['fixed_period_start_day'], 0, strlen($membershipTypeDetails['fixed_period_start_day']) - 2);
$day = substr($membershipTypeDetails['fixed_period_start_day'], -2);
$year += 1;
* @param int $orgID
* Id of Organization.
*
- * @return Array array of the details of membership types
+ * @return Array
+ * array of the details of membership types
* @static
*/
public static function getMembershipTypesByOrg($orgID) {
*
* @param array membership types
*
- * @return Array array of the details of membership types with Member of Contact id
+ * @return Array
+ * array of the details of membership types with Member of Contact id
* @static
*/
public static function getMemberOfContactByMemTypes($membershipTypes) {
* Funtion to retrieve organization and associated membership
* types
*
- * @return array arrays of organization and membership types
+ * @return array
+ * arrays of organization and membership types
*
* @static
*/
$query = 'SELECT memType.id, memType.name, memType.member_of_contact_id, c.sort_name
FROM civicrm_membership_type memType INNER JOIN civicrm_contact c ON c.id = memType.member_of_contact_id
WHERE memType.is_active = 1 ';
- $dao = CRM_Core_DAO::executeQuery( $query );
+ $dao = CRM_Core_DAO::executeQuery($query);
while ($dao->fetch()) {
$orgs[$dao->member_of_contact_id] = $dao->sort_name;
$types[$dao->member_of_contact_id][$dao->id] = $dao->name;