$acParams = array(
'activity_id' => $activityId,
'contact_id' => $params['source_contact_id'],
- 'record_type_id' => $sourceID
+ 'record_type_id' => $sourceID,
);
self::deleteActivityContact($activityId, $sourceID);
CRM_Activity_BAO_ActivityContact::create($acParams);
$activityTargetParams = array(
'activity_id' => $activityID,
'contact_id' => $toID,
- 'record_type_id' => $targetID
+ 'record_type_id' => $targetID,
);
CRM_Activity_BAO_ActivityContact::create($activityTargetParams);
$activityTargetParams = array(
'activity_id' => $activityID,
'contact_id' => $toID,
- 'record_type_id' => $targetID
+ 'record_type_id' => $targetID,
);
CRM_Activity_BAO_ActivityContact::create($activityTargetParams);
return TRUE;
'case_recent_activity_date' => array('title' => ts('Activity Actual Date'), 'type' => CRM_Utils_Type::T_DATE),
'case_scheduled_activity_date' => array(
'title' => ts('Activity Scheduled Date'),
- 'type' => CRM_Utils_Type::T_DATE
+ 'type' => CRM_Utils_Type::T_DATE,
),
'case_recent_activity_type' => array('title' => ts('Activity Type'), 'type' => CRM_Utils_Type::T_STRING),
'case_activity_status' => array('title' => ts('Activity Status'), 'type' => CRM_Utils_Type::T_STRING),
'case_activity_details' => array('title' => ts('Activity Details'), 'type' => CRM_Utils_Type::T_TEXT),
'case_activity_is_auto' => array(
'title' => ts('Activity Auto-generated?'),
- 'type' => CRM_Utils_Type::T_BOOLEAN
+ 'type' => CRM_Utils_Type::T_BOOLEAN,
),
);
";
$params = array(
1 => array($activityID, 'Integer'),
- 2 => array($recordTypeID, 'Integer')
+ 2 => array($recordTypeID, 'Integer'),
);
$dao = CRM_Core_DAO::executeQuery($query, $params);
";
$params = array(
1 => array($activityID, 'Integer'),
- 2 => array($recordTypeID, 'Integer')
+ 2 => array($recordTypeID, 'Integer'),
);
$dao = CRM_Core_DAO::executeQuery($sql, $params);
'type' => 'text',
'label' => ts('Location'),
'attributes' => CRM_Core_DAO::getAttribute('CRM_Activity_DAO_Activity', 'location'),
- 'required' => FALSE
+ 'required' => FALSE,
),
'details' => array(
'type' => 'wysiwyg',
'label' => ts('Details'),
// forces a smaller edit window
'attributes' => array('rows' => 4, 'cols' => 60),
- 'required' => FALSE
+ 'required' => FALSE,
),
'status_id' => array(
'type' => 'select',
'source_contact_id' => array(
'type' => 'entityRef',
'label' => ts('Added By'),
- 'required' => FALSE
+ 'required' => FALSE,
),
'target_contact_id' => array(
'type' => 'entityRef',
'label' => ts('With Contact'),
- 'attributes' => array('multiple' => TRUE, 'create' => TRUE)
+ 'attributes' => array('multiple' => TRUE, 'create' => TRUE),
),
'assignee_contact_id' => array(
'type' => 'entityRef',
'label' => ts('Subject'),
'attributes' => CRM_Core_DAO::getAttribute('CRM_Activity_DAO_Activity',
'subject'
- )
- )
+ ),
+ ),
);
if (($this->_context == 'standalone') &&
if ($this->_activityId &&
in_array($this->_action, array(
CRM_Core_Action::UPDATE,
- CRM_Core_Action::VIEW
+ CRM_Core_Action::VIEW,
)) &&
!CRM_Activity_BAO_Activity::checkPermission($this->_activityId, $this->_action)
) {
'standalone',
'home',
'dashlet',
- 'dashletFullscreen'
+ 'dashletFullscreen',
))
) {
$urlParams = 'reset=1';
'type' => 'next',
'name' => $button,
'spacing' => ' ',
- 'isDefault' => TRUE
+ 'isDefault' => TRUE,
),
array(
'type' => 'cancel',
- 'name' => ts('Cancel')
- )
+ 'name' => ts('Cancel'),
+ ),
));
return;
}
$buttons = array();
$buttons[] = array(
'type' => 'cancel',
- 'name' => ts('Done')
+ 'name' => ts('Done'),
);
$this->addButtons($buttons);
}
'type' => 'upload',
'name' => ts('Save'),
'js' => $js,
- 'isDefault' => TRUE
+ 'isDefault' => TRUE,
),
array(
'type' => 'cancel',
- 'name' => ts('Cancel')
- )
+ 'name' => ts('Cancel'),
+ ),
)
);
}
// delete tags for the entity
$tagParams = array(
'entity_table' => 'civicrm_activity',
- 'entity_id' => $this->_activityId
+ 'entity_id' => $this->_activityId,
);
CRM_Core_BAO_EntityTag::del($tagParams);
),
'linkedColumns' => array('activity_id'),
'isRecurringEntityRecord' => FALSE,
- )
+ ),
);
CRM_Core_Form_RecurringEntity::postProcess($params, 'civicrm_activity', $linkedEntities);
array(
1 => $subject,
2 => $followupStatus,
- 3 => $mailStatus
+ 3 => $mailStatus,
)
), ts('Saved'), 'success');
$errors['_qf_default'] .= ts('Missing required field: Provide %1 or %2',
array(
1 => $title,
- 2 => 'Activity Type Label'
+ 2 => 'Activity Type Label',
)) . '<br />';
}
}
'activity_label' => array(
'title' => ts('Activity Type Label'),
'headerPattern' => '/(activity.)?type label?/i',
- )
+ ),
));
foreach ($fields as $name => $field) {
0 => 'relation',
1 => 'name',
2 => 'phone',
- 3 => 'email'
+ 3 => 'email',
);
$sEcho = CRM_Utils_Type::escape($_REQUEST['sEcho'], 'Integer');
1 => 'name',
2 => 'phone',
3 => 'email',
- 4 => 'actions'
+ 4 => 'actions',
);
$sEcho = CRM_Utils_Type::escape($_REQUEST['sEcho'], 'Integer');
}
else {
$otherActivity->subject = ts('(Filed on case %1)', array(
- 1 => $params['caseID']
+ 1 => $params['caseID'],
)) . ' ' . $otherActivity->subject;
}
$otherActivity->activity_date_time = $actDateTime;
$src_params = array(
'activity_id' => $mainActivityId,
'contact_id' => $sourceContactID,
- 'record_type_id' => $sourceID
+ 'record_type_id' => $sourceID,
);
CRM_Activity_BAO_ActivityContact::create($src_params);
$targ_params = array(
'activity_id' => $mainActivityId,
'contact_id' => $value,
- 'record_type_id' => $targetID
+ 'record_type_id' => $targetID,
);
CRM_Activity_BAO_ActivityContact::create($targ_params);
}
$assigneeParams = array(
'activity_id' => $mainActivityId,
'contact_id' => $value,
- 'record_type_id' => $assigneeID
+ 'record_type_id' => $assigneeID,
);
CRM_Activity_BAO_ActivityContact::create($assigneeParams);
}
$this->add('select', 'paper_size', ts('Sheet Size'),
array(
- 0 => ts('- default -')
+ 0 => ts('- default -'),
) + CRM_Core_BAO_PaperSize::getList(TRUE), FALSE,
array(
- 'onChange' => "selectPaper( this.value );"
+ 'onChange' => "selectPaper( this.value );",
) + $disabled
);
$this->add('static', 'paper_dimensions', NULL, ts('Sheet Size (w x h)'));
$this->add('select', 'orientation', ts('Orientation'), CRM_Core_BAO_LabelFormat::getPageOrientations(), FALSE,
array(
- 'onChange' => "updatePaperDimensions();"
+ 'onChange' => "updatePaperDimensions();",
) + $disabled
);
$this->add('select', 'font_name', ts('Font Name'), CRM_Core_BAO_LabelFormat::getFontNames($this->_group));
$this->addRule('label', ts('Name already exists in Database.'), 'objectExists', array(
'CRM_Core_BAO_LabelFormat',
- $this->_id
+ $this->_id,
));
$this->addRule('NX', ts('Must be an integer'), 'integer');
$this->addRule('NY', ts('Must be an integer'), 'integer');
'entity_table' => 'civicrm_option_value',
'entity_id' => $optionValue->id,
'account_relationship' => $relationTypeId,
- 'financial_account_id' => $params['financial_account_id']
+ 'financial_account_id' => $params['financial_account_id'],
);
CRM_Financial_BAO_FinancialTypeAccount::add($params);
}
'entity_table' => 'civicrm_payment_processor',
'entity_id' => $dao->id,
'account_relationship' => $relationTypeId,
- 'financial_account_id' => $values['financial_account_id']
+ 'financial_account_id' => $values['financial_account_id'],
);
CRM_Financial_BAO_FinancialTypeAccount::add($params);
}
'title' => ts('Dashboard entries'),
'weight' => 2,
'description' => ts('Configure how many events should be shown on the dashboard. This overrides the default value of 10 entries.'),
- 'option_values' => array('' => ts('- select -')) + $optionValues + array(-1 => ts('show all'))
- )
+ 'option_values' => array('' => ts('- select -')) + $optionValues + array(-1 => ts('show all')),
+ ),
),
);
$recipientKind = array(
'participant_role' => array(
'name' => 'participant role',
- 'target_id' => 'recipient_listing'
+ 'target_id' => 'recipient_listing',
),
'manual' => array(
'name' => 'recipient',
- 'target_id' => 'recipient_manual_id'
- )
+ 'target_id' => 'recipient_manual_id',
+ ),
);
if (!empty($fields['limit_to']) && array_key_exists($fields['recipient'], $recipientKind) && empty($fields[$recipientKind[$fields['recipient']]['target_id']])) {
$errors[$recipientKind[$fields['recipient']]['target_id']] = ts('If "Also include" or "Limit to" are selected, you must specify at least one %1', array(1 => $recipientKind[$fields['recipient']]['name']));
'version' => 3,
'name' => $setting,
'group' => $group,
- 'default_value' => CRM_Utils_Array::value('default', $settingMetaData['values'][$setting])
+ 'default_value' => CRM_Utils_Array::value('default', $settingMetaData['values'][$setting]),
)
);
}
public function buildQuickForm() {
CRM_Utils_System::setTitle(ts('Settings - Resource URLs'));
$settingFields = civicrm_api('setting', 'getfields', array(
- 'version' => 3
+ 'version' => 3,
));
$this->addElement('text', 'userFrameworkResourceURL', ts('CiviCRM Resource URL'));
$comps = array(
'Event' => 'civicrm_event',
'Contribution' => 'civicrm_contribution_page',
- 'EventTemplate' => 'civicrm_event_template'
+ 'EventTemplate' => 'civicrm_event_template',
);
$contexts = array();
foreach ($comps as $name => $table) {
'communication_style',
'case_status', 'encounter_medium',
'case_type', 'payment_instrument',
- 'soft_credit_type', 'website_type'
+ 'soft_credit_type', 'website_type',
)
)) {
$this->assign('showIsDefault', TRUE);
'cap' => 'round',
'join' => 'round',
'dash' => '2,2',
- 'color' => array(0, 0, 200)
+ 'color' => array(0, 0, 200),
));
$rowCount = CRM_Badge_Form_Layout::FIELD_ROWCOUNT;
$resources = CRM_Core_Resources::singleton();
$resources->addSetting(
array(
- 'kcfinderPath' => $config->userFrameworkResourceURL . 'packages' . DIRECTORY_SEPARATOR
+ 'kcfinderPath' => $config->userFrameworkResourceURL . 'packages' . DIRECTORY_SEPARATOR,
)
);
$resources->addScriptFile('civicrm', 'templates/CRM/Badge/Form/Layout.js', 1, 'html-header');
'{event.event_id}' => ts('Event ID'),
'{event.title}' => ts('Event Title'),
'{event.start_date}' => ts('Event Start Date'),
- '{event.end_date}' => ts('Event End Date')
+ '{event.end_date}' => ts('Event End Date'),
);
$participantTokens = CRM_Core_SelectValues::participantTokens();
'url' => 'civicrm/file',
'qs' => 'reset=1&id=%%fid%%&eid=%%eid%%',
'title' => ts('Download Batch'),
- )
+ ),
);
}
else {
'url' => 'civicrm/batch',
'qs' => 'action=delete&id=%%id%%',
'title' => ts('Delete Batch'),
- )
+ ),
);
}
return $links;
array(
'type' => 'upload',
'name' => ts('Validate & Process the Batch'),
- 'isDefault' => TRUE
+ 'isDefault' => TRUE,
),
array(
'type' => 'cancel',
'name' => ts('Save & Continue Later'),
- )
+ ),
)
);
'join_date' => $currentDate,
'receive_date' => $currentDate,
'receive_date_time' => $currentTime,
- 'contribution_status_id' => $completeStatus
+ 'contribution_status_id' => $completeStatus,
);
for ($rowNumber = 1; $rowNumber <= $this->_batchInfo['item_count']; $rowNumber++) {
$dateTypes = array(
'join_date' => 'joinDate',
'membership_start_date' => 'startDate',
- 'membership_end_date' => 'endDate'
+ 'membership_end_date' => 'endDate',
);
$dates = array(
'join_date',
'start_date',
'end_date',
- 'reminder_date'
+ 'reminder_date',
);
// get the price set associated with offline memebership
$editedFieldParams = array(
'price_set_id' => $priceSetId,
- 'name' => $value['membership_type'][0]
+ 'name' => $value['membership_type'][0],
);
$editedResults = array();
$fid = $editedResults['id'];
$editedFieldParams = array(
'price_field_id' => $editedResults['id'],
- 'membership_type_id' => $value['membership_type_id']
+ 'membership_type_id' => $value['membership_type_id'],
);
$editedResults = array();
$params = array(
1 => array($activity_id, 'Integer'),
2 => array($contact_id, 'Integer'),
- 3 => array($sourceID, 'Integer')
+ 3 => array($sourceID, 'Integer'),
);
CRM_Core_DAO::executeQuery($sql, $params);
$sourceID = CRM_Utils_Array::key('Activity Source', $activityContacts);
$params = array(
1 => array($surveyId, 'Integer'),
- 2 => array($sourceID, 'Integer')
+ 2 => array($sourceID, 'Integer'),
);
$sql .= " GROUP BY civicrm_address.country_id";
$fields = array('total', 'country_id', 'country_iso', 'country');
2 => array($surveyId, 'Integer'),
3 => array($surveyInfo['activity_type_id'], 'Integer'),
4 => array($contactId, 'Integer'),
- 5 => array($sourceID, 'Integer')
+ 5 => array($sourceID, 'Integer'),
);
$dao = CRM_Core_DAO::executeQuery($sql, $params);
'status_id' => $activity->status_id,
'interviewer_id' => $activity->interviewer_id,
'result' => $activity->result,
- 'activity_date_time' => $activity->activity_date_time
+ 'activity_date_time' => $activity->activity_date_time,
);
}
// custom group id
$this->add('select', 'profile_id', ts('Activity Profile'),
array(
- '' => ts('- select -')
+ '' => ts('- select -'),
) + $customProfiles
);
array(
1 => $activityTypes[$subTypeId],
2 => CRM_Utils_System::url('civicrm/admin/custom/group', 'action=add&reset=1'),
- 3 => '_blank'
+ 3 => '_blank',
)
)
);
'option_group_id',
ts('Select Result Set'),
array(
- '' => ts('- select -')
+ '' => ts('- select -'),
) + $optionGroups, FALSE,
array('onChange' => 'loadOptionGroup( )')
);
ts('Survey Responses'),
$optionTypes,
array(
- 'onclick' => "showOptionSelect();"
+ 'onclick' => "showOptionSelect();",
), '<br/>', TRUE
);
$this->addFormRule(array(
'CRM_Campaign_Form_Survey_Results',
- 'formRule'
+ 'formRule',
), $this);
parent::buildQuickForm();
array(
1 => array(
'column' => 'sort_name',
- 'order' => 'ASC'
+ 'order' => 'ASC',
),
);
// for WalkList or default
'street_number',
'street_name',
'street_unit',
- 'survey_response'
+ 'survey_response',
);
if (CRM_Core_OptionGroup::getValue('activity_type', 'WalkList') ==
$this->_values['activity_type_id']
array(
1 => array(
'column' => 'street_name',
- 'order' => 'ASC'
+ 'order' => 'ASC',
),
2 => array(
'column' => 'street_number_odd_even',
- 'order' => 'ASC'
+ 'order' => 'ASC',
),
3 => array(
'column' => 'street_number',
- 'order' => 'ASC'
+ 'order' => 'ASC',
),
4 => array(
'column' => 'sort_name',
- 'order' => 'ASC'
+ 'order' => 'ASC',
),
);
}
$reportID = CRM_Core_DAO::singleValueQuery($query, array(
1 => array(
"survey_{$survey->id}",
- 'String'
- )
+ 'String',
+ ),
));
if ($reportID) {
$url = CRM_Utils_System::url("civicrm/report/instance/{$reportID}", 'reset=1');
'source_contact_id' => 'source_contact',
'location' => 'activity_location',
'campaign_id' => 'activity_campaign_id',
- 'duration' => 'activity_duration'
+ 'duration' => 'activity_duration',
);
foreach ($activityParams as $key => $field) {
if (!empty($params[$field])) {
1 => $otherCaseId,
2 => $otherContactDisplayName,
3 => $mainContactDisplayName,
- 4 => $mainCaseId
+ 4 => $mainCaseId,
)
);
}
1 => $otherCaseId,
2 => $otherContactId,
3 => $mainContactId,
- 4 => $mainCaseId
+ 4 => $mainCaseId,
)
);
}
//need to check activity object specific.
if (in_array($operation, array(
'view',
- 'edit'
+ 'edit',
))
) {
//do we have supper permission.
'Link Cases',
'Assign Case Role',
'Email',
- 'Inbound Email'
+ 'Inbound Email',
);
//do not allow to delete these activities, CRM-4543
'Reassigned Case',
'Merge Case',
'Link Cases',
- 'Assign Case Role'
+ 'Assign Case Role',
);
if (in_array($actTypeName, $singletonNames)) {
CRM_Core_Error::statusBounce(ts("You can not add another '%1' activity to this case. %2",
array(
1 => $this->_activityTypeName,
- 2 => "Do you want to <a href='$editUrl'>edit the existing activity</a> ?"
+ 2 => "Do you want to <a href='$editUrl'>edit the existing activity</a> ?",
)
),
$url
unset($aTypes[$openCaseID]);
asort($aTypes);
$this->_fields['followup_activity_type_id']['attributes'] = array(
- '' => '- select activity type -'
+ '' => '- select activity type -',
) + $aTypes;
}
$tagParams = array(
'entity_table' => 'civicrm_activity',
- 'entity_id' => $this->_activityId
+ 'entity_id' => $this->_activityId,
);
CRM_Core_BAO_EntityTag::del($tagParams);
1 => $this->_activityTypeName,
2 => $recordStatus,
3 => $followupStatus,
- 4 => $mailStatus
+ 4 => $mailStatus,
)
), 'info');
}
if ($activity->subject == 'null') {
$activity->subject = ts('Case status changed from %1 to %2', array(
1 => CRM_Utils_Array::value($statusval, $form->_caseStatus),
- 2 => CRM_Utils_Array::value($params['case_status_id'], $form->_caseStatus)
+ 2 => CRM_Utils_Array::value($params['case_status_id'], $form->_caseStatus),
)
);
$activity->save();
'name' => $actType,
'description' => $actType,
'component_id' => 'CiviCase',
- )
+ ),
);
// We'll create managed-entity if this record doesn't exist yet
'contact_type_b' => 'Individual',
'contact_sub_type_a' => NULL,
'contact_sub_type_b' => NULL,
- )
+ ),
);
// We'll create managed-entity if this record doesn't exist yet
'Individual',
'Household',
'Organization',
- 'All'
+ 'All',
))) {
$fields = array_merge($fields, CRM_Core_OptionValue::getFields('', $contactType));
}
'household_name',
'legal_name',
'sic_code',
- 'organization_name'
+ 'organization_name',
),
'Household' => array(
'first_name',
'name' => 'location_type',
'where' => 'civicrm_location_type.name',
'title' => ts('Location Type'),
- )
+ ),
);
$IMProvider = array(
'name' => 'im_provider',
'where' => 'civicrm_im.provider_id',
'title' => ts('IM Provider'),
- )
+ ),
);
$locationFields = array_merge($locationType,
foreach (array(
'Individual',
'Household',
- 'Organization'
+ 'Organization',
) as $type) {
$fields = array_merge($fields,
CRM_Core_BAO_CustomField::getFieldsForImport($type, FALSE, FALSE, $search, TRUE, $withMultiRecord)
'postal_greeting_custom',
'addressee_custom',
'prefix_id',
- 'suffix_id'
+ 'suffix_id',
),
'Organization' => array(
'first_name',
'im',
'email',
'openid',
- 'phone_ext'
+ 'phone_ext',
))) {
if ($type) {
$returnProperties['location'][$locationTypeName][$fieldName . '-' . $type] = 1;
'gender_id',
'current_employer',
'prefix_id',
- 'suffix_id'
+ 'suffix_id',
)) &&
($value == '' || !isset($value)) &&
($session->get('authSrc') & (CRM_Core_Permission::AUTH_SRC_CHECKSUM + CRM_Core_Permission::AUTH_SRC_LOGIN)) == 0
'preferred_communication_method' => array(
'newName' => 'preferred_communication_method_display',
'groupName' => 'preferred_communication_method',
- )
+ ),
);
CRM_Core_OptionGroup::lookupValues($temp, $names, FALSE);
$hasAllPermissions = TRUE;
}
elseif (in_array($values['ref'], array(
- 'new-email'
+ 'new-email',
))) {
// grant permissions for these tasks.
$hasAllPermissions = TRUE;
// build directly accessible action menu.
if (in_array($values['ref'], array(
'view-contact',
- 'edit-contact'
+ 'edit-contact',
))) {
$contextMenu['primaryActions'][$key] = array(
'title' => $values['title'],
$allGroups[$dao->id] = array(
'title' => $dao->title,
'visibility' => $dao->visibility,
- 'description' => $dao->description
+ 'description' => $dao->description,
);
if ($dao->parents == $parents) {
$roots[] = array(
'id' => $dao->id,
'prefix' => '',
- 'title' => $dao->title
+ 'title' => $dao->title,
);
}
else {
'id' => $dao->id,
'prefix' => '',
'title' => $dao->title,
- 'parents' => $parent
+ 'parents' => $parent,
);
}
}
$new_roots[] = array(
'id' => $row['id'],
'prefix' => $groups[$root['id']][0] . $spacer,
- 'title' => $row['title']
+ 'title' => $row['title'],
);
unset($rows[$key]);
}
'id' => $dao->group_id,
'title' => $dao->title,
'description' => $dao->description,
- 'children' => $dao->children
+ 'children' => $dao->children,
);
$contactGroup[$dao->contact_id]['groupTitle'][] = $dao->title;
}
$qill = ts('Proximity search to a distance of %1 from %2',
array(
1 => $qillUnits,
- 2 => implode(', ', $qill)
+ 2 => implode(', ', $qill),
)
);
'idCol' => "{$tName}_id",
'bao' => 'CRM_Core_BAO_Address',
'table' => "civicrm_{$tName}",
- 'join' => " LEFT JOIN civicrm_{$tName} ON civicrm_address.{$tName}_id = civicrm_{$tName}.id "
+ 'join' => " LEFT JOIN civicrm_{$tName} ON civicrm_address.{$tName}_id = civicrm_{$tName}.id ",
);
$this->_pseudoConstantsSelect[$tName] =
'pseudoField' => 'state_province_abbreviation',
'idCol' => "{$tName}_id",
'table' => "civicrm_{$tName}",
- 'join' => " LEFT JOIN civicrm_{$tName} ON civicrm_address.{$tName}_id = civicrm_{$tName}.id "
+ 'join' => " LEFT JOIN civicrm_{$tName} ON civicrm_address.{$tName}_id = civicrm_{$tName}.id ",
);
}
else {
'idCol' => "{$tName}_id",
'bao' => 'CRM_Core_BAO_Address',
'table' => "civicrm_{$tName}",
- 'join' => " LEFT JOIN civicrm_{$tName} ON civicrm_address.{$tName}_id = civicrm_{$tName}.id "
+ 'join' => " LEFT JOIN civicrm_{$tName} ON civicrm_address.{$tName}_id = civicrm_{$tName}.id ",
);
}
$this->_pseudoConstantsSelect['individual_prefix'] = array(
'pseudoField' => 'prefix_id',
'idCol' => "prefix_id",
- 'bao' => 'CRM_Contact_BAO_Contact'
+ 'bao' => 'CRM_Contact_BAO_Contact',
);
}
if ($fieldName == 'suffix_id') {
$this->_pseudoConstantsSelect['individual_suffix'] = array(
'pseudoField' => 'suffix_id',
'idCol' => "suffix_id",
- 'bao' => 'CRM_Contact_BAO_Contact'
+ 'bao' => 'CRM_Contact_BAO_Contact',
);
}
if ($fieldName == 'gender_id') {
$this->_pseudoConstantsSelect['gender'] = array(
'pseudoField' => 'gender_id',
'idCol' => "gender_id",
- 'bao' => 'CRM_Contact_BAO_Contact'
+ 'bao' => 'CRM_Contact_BAO_Contact',
);
}
if ($name == 'communication_style_id') {
$this->_pseudoConstantsSelect['communication_style'] = array(
'pseudoField' => 'communication_style_id',
'idCol' => "communication_style_id",
- 'bao' => 'CRM_Contact_BAO_Contact'
+ 'bao' => 'CRM_Contact_BAO_Contact',
);
}
$this->_select[$name] = "contact_a.{$fieldName} as `$name`";
$this->_pseudoConstantsSelect["{$name}-{$elementFullName}"] = array(
'pseudoField' => "{$pf}_id",
'idCol' => "{$tName}_id",
- 'bao' => 'CRM_Core_BAO_Address'
+ 'bao' => 'CRM_Core_BAO_Address',
);
$this->_pseudoConstantsSelect["{$name}-{$elementFullName}"]['select'] = "`$tName`.$fieldName as `{$name}-{$elementFullName}`";
}
'gender_id',
'prefix_id',
'suffix_id',
- 'communication_style_id'
+ 'communication_style_id',
);
if (is_numeric($value)) {
$result = CRM_Core_DAO::executeQuery("SELECT " . implode(',', $fieldsToFill) . " FROM civicrm_relationship WHERE id = %1", array(
1 => array(
$params['id'],
- 'Integer'
- )
+ 'Integer',
+ ),
));
while ($result->fetch()) {
foreach ($fieldsToFill as $field) {
foreach (array(
'join_date',
'start_date',
- 'end_date'
+ 'end_date',
) as $dateField) {
if (!empty($membershipValues[$dateField])) {
$membershipValues[$dateField] = CRM_Utils_Date::processDate($membershipValues[$dateField]);
public static function membershipTypeToRelationshipTypes(&$params, $direction = NULL) {
$membershipType = civicrm_api3('membership_type', 'getsingle', array(
'id' => $params['membership_type_id'],
- 'return' => 'relationship_type_id, relationship_direction'
+ 'return' => 'relationship_type_id, relationship_direction',
));
$relationshipTypes = $membershipType['relationship_type_id'];
if (empty($relationshipTypes)) {
for ($count = 0; $count < self::RULES_COUNT; $count++) {
$this->add('select', "where_$count", ts('Field'),
array(
- NULL => ts('- none -')
+ NULL => ts('- none -'),
) + $this->_fields, FALSE, $disabled
);
$this->add('text', "length_$count", ts('Length'), $attributes);
$this->_locBlockIds = array(
'main' => $rowsElementsAndInfo['main_details']['loc_block_ids'],
- 'other' => $rowsElementsAndInfo['other_details']['loc_block_ids']
+ 'other' => $rowsElementsAndInfo['other_details']['loc_block_ids'],
);
// add elements
$requiredProfileFields = array(
'Individual' => array('first_name', 'last_name'),
'Organization' => array('organization_name', 'email'),
- 'Household' => array('household_name', 'email')
+ 'Household' => array('household_name', 'email'),
);
$validProfile = CRM_Core_BAO_UFGroup::checkValidProfile($form->_honoreeProfileId, $requiredProfileFields[$profileContactType]);
if (!$validProfile) {
),
'honor_id' => $honorId,
'honor_profile_id' => $params['honoree_profile_id'],
- 'honor_profile_values' => $params['honor']
+ 'honor_profile_values' => $params['honor'],
);
}
}
'entity_id' => $this->_relationshipId,
'entity_table' => 'civicrm_relationship',
'limit' => 1,
- 'version' => 3
+ 'version' => 3,
);
$note = civicrm_api('Note' ,'getsingle', $noteParams);
$defaults['note'] = CRM_Utils_Array::value('note', $note);
$form->addElement('text', 'prox_distance', ts('Find contacts within'), array('class' => 'six'));
$form->addElement('select', 'prox_distance_unit', NULL, array(
'miles' => ts('Miles'),
- 'kilos' => ts('Kilometers')
+ 'kilos' => ts('Kilometers'),
));
$form->addRule('prox_distance', ts('Please enter positive number as a distance'), 'numeric');
}
$activityTargetParams = array(
'activity_id' => empty($activity->id) ? $activityIds[$contactId] : $activity->id,
'contact_id' => $contactId,
- 'record_type_id' => $targetID
+ 'record_type_id' => $targetID,
);
CRM_Activity_BAO_ActivityContact::create($activityTargetParams);
}
'context' => 'context',
'rel' => 'rel',
'contact_sub_type' => 'contact_sub_type',
- 'contact_type' => 'contact_type'
+ 'contact_type' => 'contact_type',
);
foreach ($whitelist as $key => $param) {
if (!empty($_GET[$key])) {
$ret = array(
'is_error' => 1,
'error_message' => ts('The relationship type definition for the case role is not valid for the client and / or staff contact types. You can review and edit relationship types at <a href="%1">Administer >> Option Lists >> Relationship Types</a>.',
- array(1 => CRM_Utils_System::url('civicrm/admin/reltype', 'reset=1')))
+ array(1 => CRM_Utils_System::url('civicrm/admin/reltype', 'reset=1'))),
);
}
}
// FIXME Optimize performance of image_url query
$sql = "SELECT id FROM civicrm_contact WHERE image_url like %1;";
$params = array(
- 1 => array("%" . $_GET['photo'], 'String')
+ 1 => array("%" . $_GET['photo'], 'String'),
);
$dao = CRM_Core_DAO::executeQuery($sql, $params);
while ($dao->fetch()) {
'weight' => $weight,
'count' => CRM_Contact_BAO_Contact::getCountComponent($id, $this->_contactId, $group['table_name']),
'hideCount' => !$group['is_multiple'],
- 'class' => 'livePage'
+ 'class' => 'livePage',
);
$weight += 10;
}
if (in_array('world_region', $names)) {
$pseudoconstants['world_region'] = array(
'dbName' => 'world_region_id',
- 'values' => CRM_Core_PseudoConstant::worldRegion()
+ 'values' => CRM_Core_PseudoConstant::worldRegion(),
);
}
'contribution_status' => array(
'title' => ts('Contribution Status'),
'name' => 'contribution_status',
- 'data_type' => CRM_Utils_Type::T_STRING
- )
+ 'data_type' => CRM_Utils_Type::T_STRING,
+ ),
);
$contributionNote = array(
array(
'title' => ts('Contribution Note'),
'name' => 'contribution_note',
- 'data_type' => CRM_Utils_Type::T_TEXT
- )
+ 'data_type' => CRM_Utils_Type::T_TEXT,
+ ),
);
$contributionRecurId = array(
'title' => ts('Recurring Contributions ID'),
'name' => 'contribution_recur_id',
'where' => 'civicrm_contribution.contribution_recur_id',
- 'data_type' => CRM_Utils_Type::T_INT
- )
+ 'data_type' => CRM_Utils_Type::T_INT,
+ ),
);
$extraFields = array(
'contribution_batch' => array(
- 'title' => ts('Batch Name')
- )
+ 'title' => ts('Batch Name'),
+ ),
);
$softCreditFields = array(
'name' => 'contribution_soft_credit_name',
'title' => 'Soft Credit For',
'where' => 'civicrm_contact_d.display_name',
- 'data_type' => CRM_Utils_Type::T_STRING
+ 'data_type' => CRM_Utils_Type::T_STRING,
),
'contribution_soft_credit_amount' => array(
'name' => 'contribution_soft_credit_amount',
'title' => 'Soft Credit Amount',
'where' => 'civicrm_contribution_soft.amount',
- 'data_type' => CRM_Utils_Type::T_MONEY
+ 'data_type' => CRM_Utils_Type::T_MONEY,
),
'contribution_soft_credit_type' => array(
'name' => 'contribution_soft_credit_type',
'title' => 'Soft Credit Type',
'where' => 'contribution_softcredit_type.label',
- 'data_type' => CRM_Utils_Type::T_STRING
+ 'data_type' => CRM_Utils_Type::T_STRING,
),
'contribution_soft_credit_contribution_id' => array(
'name' => 'contribution_soft_credit_contribution_id',
'title' => 'Soft Credit For Contribution ID',
'where' => 'civicrm_contribution_soft.contribution_id',
- 'data_type' => CRM_Utils_Type::T_INT
+ 'data_type' => CRM_Utils_Type::T_INT,
),
);
$softCreditTypes[$key] = $softCredit['soft_credit_type_label'];
$softCredits[$key] = array(
'Name' => $softCredit['contact_name'],
- 'Amount' => CRM_Utils_Money::format($softCredit['amount'], $softCredit['currency'])
+ 'Amount' => CRM_Utils_Money::format($softCredit['amount'], $softCredit['currency']),
);
}
$template->assign('softCreditTypes', $softCreditTypes);
$primaryEmail = CRM_Core_DAO::getFieldValue('CRM_Core_DAO_Email', $this->_relatedObjects['participant']->contact_id, 'email', 'contact_id');
$primaryAmount[] = array(
'label' => $this->_relatedObjects['participant']->fee_level . ' - ' . $primaryEmail,
- 'amount' => $this->_relatedObjects['participant']->fee_amount
+ 'amount' => $this->_relatedObjects['participant']->fee_amount,
);
//build an array of cId/pId of participants
$additionalIDs = CRM_Event_BAO_Event::buildCustomProfile($this->_relatedObjects['participant']->id, NULL, $this->_relatedObjects['contact']->id, $isTest, TRUE);
$amount[0] = array('label' => $additional->fee_level, 'amount' => $additional->fee_amount);
$primaryAmount[] = array(
'label' => $additional->fee_level . ' - ' . $additionalParticipantInfo,
- 'amount' => $additional->fee_amount
+ 'amount' => $additional->fee_amount,
);
$additional->save();
$additional->free();
$skipRecords = TRUE;
$pendingStatus = array(
array_search('Pending', $contributionStatuses),
- array_search('In Progress', $contributionStatuses)
+ array_search('In Progress', $contributionStatuses),
);
if (in_array(CRM_Utils_Array::value('contribution_status_id', $params), $pendingStatus)) {
$relationTypeId = key(CRM_Core_PseudoConstant::accountOptionValues('account_relationship', NULL, " AND v.name LIKE 'Accounts Receivable Account is' "));
'status_id' => $prevfinancialItem->status_id,
'financial_account_id' => $financialAccount,
'entity_table' => 'civicrm_line_item',
- 'entity_id' => $fieldValues['id']
+ 'entity_id' => $fieldValues['id'],
);
CRM_Financial_BAO_FinancialItem::create($itemParams, NULL, $trxnIds);
'Completed' => array('Cancelled', 'Refunded'),
'Pending' => array('Cancelled', 'Completed', 'Failed'),
'In Progress' => array('Cancelled', 'Completed', 'Failed'),
- 'Refunded' => array('Cancelled', 'Completed')
+ 'Refunded' => array('Cancelled', 'Completed'),
);
if (!in_array($contributionStatuses[$fields['contribution_status_id']], $checkStatus[$contributionStatuses[$values['contribution_status_id']]])) {
$errors['contribution_status_id'] = ts("Cannot change contribution status from %1 to %2.", array(
1 => $contributionStatuses[$values['contribution_status_id']],
- 2 => $contributionStatuses[$fields['contribution_status_id']]
+ 2 => $contributionStatuses[$fields['contribution_status_id']],
));
}
}
if (!empty($props['contribution_page_id'])) {
$page = civicrm_api('contribution_page', 'getsingle', array(
'version' => 3,
- 'id' => ($props['contribution_page_id'])
+ 'id' => ($props['contribution_page_id']),
));
$types = (array) CRM_Utils_Array::value('payment_processor', $page, 0);
$params['condition'] = 'id IN (' . implode(',', $types) . ')';
'amount' => $financialTrxn->total_amount,
'status_id' => array_search('Paid', $financialItemStatus),
'entity_id' => $lineItemId->id,
- 'entity_table' => 'civicrm_line_item'
+ 'entity_table' => 'civicrm_line_item',
);
$trxnIds['id'] = $financialTrxn->id;
CRM_Financial_BAO_FinancialItem::create($addFinancialEntry, NULL, $trxnIds);
'soft_credit_types' => $params['soft_credit_types'],
'default' => array(
'honor_block_title' => $params['honor_block_title'],
- 'honor_block_text' => $params['honor_block_text']
- )
- )
+ 'honor_block_text' => $params['honor_block_text'],
+ ),
+ ),
)
);
}
'soft_credit_types' => $params['soft_credit_types'],
$config->lcMessages => array(
'honor_block_title' => $params['honor_block_title'],
- 'honor_block_text' => $params['honor_block_text']
- )
- )
+ 'honor_block_text' => $params['honor_block_text'],
+ ),
+ ),
);
$ufJoinDAO = new CRM_Core_DAO_UFJoin();
$contactId = array($userID);
$pdfParams = array(
'output' => 'pdf_invoice',
- 'forPage' => 'confirmpage'
+ 'forPage' => 'confirmpage',
);
$pdfHtml = CRM_Contribute_Form_Task_Invoice::printPDF($contributionID,
$pdfParams, $contactId, CRM_Core_DAO::$_nullObject);
<br/>' . ts('The recurring contribution of %1, every %2 %3 has been cancelled.', array(
1 => $dao->amount,
2 => $dao->frequency_interval,
- 3 => $dao->frequency_unit
+ 3 => $dao->frequency_unit,
));
}
$activityParams = array(
'amount' => $dao->amount,
'contact_name' => $dao->display_name,
'soft_credit_type' => $dao->soft_credit_type_id,
- 'soft_credit_type_label' => CRM_Core_OptionGroup::getLabel('soft_credit_type', $dao->soft_credit_type_id)
+ 'soft_credit_type_label' => CRM_Core_OptionGroup::getLabel('soft_credit_type', $dao->soft_credit_type_id),
);
$count++;
}
$params = array(
1 => array($contact_id, 'Integer'),
- 2 => array($isTest, 'Integer')
+ 2 => array($isTest, 'Integer'),
);
$cs = CRM_Core_DAO::executeQuery($query, $params);
$contributionStatus = CRM_Contribute_PseudoConstant::contributionStatus();
$statusMsg .= "<br />" . ts("Membership for %1 has been updated. The membership End Date is %2.",
array(
1 => $userDisplayName,
- 2 => $endDate
+ 2 => $endDate,
)
);
}
CRM_Core_Session::setStatus(ts('This contact has a pending or overdue pledge payment of %2 which is scheduled for %3. <a href="%1">Click here to enter a pledge payment</a>.', array(
1 => $ppUrl,
2 => $ppAmountDue,
- 3 => $ppSchedDate
+ 3 => $ppSchedDate,
)), ts('Notice'), 'alert');
}
}
$form->add('select', 'contribution_page_id',
ts('Online Contribution Page'),
array(
- '' => ts('- select -')
+ '' => ts('- select -'),
) +
CRM_Contribute_PseudoConstant::contributionPage()
);
'cost' => CRM_Utils_Array::value('cost', $productDetails),
'currency' => CRM_Utils_Array::value('currency', $productDetails),
'financial_type_id' => CRM_Utils_Array::value('financial_type_id', $productDetails),
- 'contributionId' => $contributionID
+ 'contributionId' => $contributionID,
);
if ($isDeleted) {
$params['oldPremium']['product_id'] = $premoumDAO->product_id;
foreach ($params['soft_credit'] as $key => $softCredit) {
$softCredits[$key] = array(
'Name' => $softCredit['contact_name'],
- 'Amount' => CRM_Utils_Money::format($softCredit['amount'], $softCredit['currency'])
+ 'Amount' => CRM_Utils_Money::format($softCredit['amount'], $softCredit['currency']),
);
$softCreditTypes[$key] = $softCredit['soft_credit_type_label'];
}
$allPanes[$name] = array(
'url' => CRM_Utils_System::url('civicrm/payment/add', $urlParams),
'open' => $open,
- 'id' => $type
+ 'id' => $type,
);
CRM_Core_Payment_Form::buildPaymentForm($this, $this->_paymentProcessor, FALSE);
'type' => 'upload',
'name' => ts('%1', array(1 => $buttonName)),
'js' => $js,
- 'isDefault' => TRUE
+ 'isDefault' => TRUE,
),
array(
'type' => 'cancel',
- 'name' => ts('Cancel')
+ 'name' => ts('Cancel'),
),
)
);
array(
1 => $this->_subscriptionDetails->amount,
2 => $this->_subscriptionDetails->frequency_interval,
- 3 => $this->_subscriptionDetails->frequency_unit
+ 3 => $this->_subscriptionDetails->frequency_unit,
)
);
$msgTitle = 'Contribution Cancelled';
$allPanes[$name] = array(
'url' => CRM_Utils_System::url('civicrm/contact/view/contribution', $urlParams),
'open' => $open,
- 'id' => $type
+ 'id' => $type,
);
// see if we need to include this paneName in the current form
),
array(
'type' => 'cancel',
- 'name' => ts('Cancel')
- )
+ 'name' => ts('Cancel'),
+ ),
)
);
return;
foreach (array(
'Cancelled',
'Failed',
- 'In Progress'
+ 'In Progress',
) as $suppress) {
unset($status[CRM_Utils_Array::key($suppress, $statusName)]);
}
if (!$suppressFlag) {
foreach (array(
'Overdue',
- 'In Progress'
+ 'In Progress',
) as $suppress) {
unset($status[CRM_Utils_Array::key($suppress, $statusName)]);
}
'Refunded',
'Completed',
'In Progress',
- 'Cancelled'
+ 'Cancelled',
) as $suppress) {
unset($status[CRM_Utils_Array::key($suppress, $statusName)]);
}
$hasPriceSets = TRUE;
$element = $this->add('select', 'price_set_id', ts('Choose price set'),
array(
- '' => ts('Choose price set')
+ '' => ts('Choose price set'),
) + $priceSets,
NULL, array('onchange' => "buildAmount( this.value );")
);
if ($this->_online || $this->_ppID) {
$attributes['total_amount'] = array_merge($attributes['total_amount'], array(
'READONLY' => TRUE,
- 'style' => "background-color:#EBECE4"
+ 'style' => "background-color:#EBECE4",
));
$optionTypes = array(
'1' => ts('Adjust Pledge Payment Schedule?'),
'type' => 'upload',
'name' => ts('Save'),
'js' => $js,
- 'isDefault' => TRUE
+ 'isDefault' => TRUE,
),
array(
'type' => 'upload',
'name' => ts('Save and New'),
'js' => $js,
- 'subName' => 'new'
+ 'subName' => 'new',
),
array(
'type' => 'cancel',
- 'name' => ts('Cancel')
+ 'name' => ts('Cancel'),
),
)
);
$isRelatedId = FALSE;
$participantParams = array(
'fee_amount' => $submittedValues['total_amount'],
- 'id' => $entityID
+ 'id' => $entityID,
);
CRM_Event_BAO_Participant::add($participantParams);
if (empty($this->_lineItems)) {
//setting to make available to hook - although seems wrong to set on form for BAO hook availability
'soft_credit_to' => $softCreditToID,
'line_item' => $lineItems,
- 'skipLineItem' => CRM_Utils_Array::value('skipLineItem', $params, 0)
+ 'skipLineItem' => CRM_Utils_Array::value('skipLineItem', $params, 0),
);
if (!$online && isset($params['thankyou_date'])) {
$contributionParam['thankyou_date'] = $params['thankyou_date'];
foreach (array(
'phone',
'email',
- 'address'
+ 'address',
) as $blk) {
if (isset($this->_params[$blk])) {
unset($this->_params[$blk]);
foreach ($contact[$name] as $fieldName => $fieldValue) {
if (is_array($fieldValue) && !in_array($this->_fields[$name][$fieldName]['html_type'], array(
'Multi-Select',
- 'AdvMulti-Select'
+ 'AdvMulti-Select',
))
) {
foreach ($fieldValue as $key => $value) {
elseif (in_array($name, array(
'addressee',
'email_greeting',
- 'postal_greeting'
+ 'postal_greeting',
)) && !empty($contact[$name . '_custom'])
) {
$defaults[$name . '_custom'] = $contact[$name . '_custom'];
elseif (!(strstr($fld, '-'))) {
if (in_array($fld, array(
'contribution_campaign_id',
- 'member_campaign_id'
+ 'member_campaign_id',
))) {
$fld = 'campaign_id';
}
'cost' => $productDAO->cost,
'currency' => $productDAO->currency,
'financial_type_id' => $params['financial_type_id'],
- 'contributionId' => $contribution->id
+ 'contributionId' => $contribution->id,
);
CRM_Core_BAO_FinancialTrxn::createPremiumTrxn($trxnParams);
}
'pcp_display_in_roll',
'pcp_roll_nickname',
'pcp_personal_note',
- 'amount'
+ 'amount',
) as $val) {
if (!empty($params[$val])) {
$contributionSoftParams[$val] = $params[$val];
'pcp_display_in_roll',
'pcp_is_anonymous',
'pcp_roll_nickname',
- 'pcp_personal_note'
+ 'pcp_personal_note',
) as $val) {
if (!empty($params[$val])) {
$page->assign($val, $params[$val]);
else {
$params['is_pay_later'] = civicrm_api3('contribution_page', 'getvalue', array(
'id' => $id,
- 'return' => 'is_pay_later'
+ 'return' => 'is_pay_later',
));
}
}
}
$defaults['soft_credit_types'] = array(
CRM_Utils_Array::value('in_honor_of', $soft_credit_types),
- CRM_Utils_Array::value('in_memory_of', $soft_credit_types)
+ CRM_Utils_Array::value('in_memory_of', $soft_credit_types),
);
}
}
}
$defaults['soft_credit_types'] = array(
CRM_Utils_Array::value('in_honor_of', $soft_credit_types),
- CRM_Utils_Array::value('in_memory_of', $soft_credit_types)
+ CRM_Utils_Array::value('in_memory_of', $soft_credit_types),
);
}
'entity' => 'ContributionSoft',
'field' => 'soft_credit_type_id',
'multiple' => TRUE,
- 'class' => 'huge'
+ 'class' => 'huge',
));
$entities = array(
'module' => 'soft_credit',
'entity_table' => 'civicrm_contribution_page',
'entity_id' => $dao->id,
- )
+ ),
);
foreach ($ufJoinParams as $index => $ufJoinParam) {
array(
'url' => $url,
'title' => ts('Search Results'),
- )
+ ),
);
CRM_Utils_System::appendBreadCrumb($breadCrumb);
$this->addWysiwyg('email_comment', ts('If you would like to add personal message to email please add it here. (If sending to more then one receipient the same message will be sent to each contact.)'), array(
'rows' => 2,
- 'cols' => 40
+ 'cols' => 40,
));
$this->addButtons(array(
CRM_Utils_PDF_Utils::html2pdf($messageInvoice, 'Invoice.pdf', FALSE, array(
'margin_top' => 10,
'margin_left' => 65,
- 'metric' => 'px'
+ 'metric' => 'px',
));
// functions call for adding activity with attachment
$fileName = self::putFile($html);
if (!empty($formValues['email_options'])) {
$returnProperties['email'] = $returnProperties['on_hold'] = $returnProperties['is_deceased'] = $returnProperties['do_not_email'] = 1;
$emailParams = array(
- 'subject' => $formValues['subject']
+ 'subject' => $formValues['subject'],
);
// We need display_name for emailLetter() so add to returnProperties here
$returnProperties['display_name'] = 1;
array(
1 => $this->_subscriptionDetails->amount,
2 => $this->_subscriptionDetails->frequency_interval,
- 3 => $this->_subscriptionDetails->frequency_unit
+ 3 => $this->_subscriptionDetails->frequency_unit,
)
);
$msgTitle = ts('Details Updated');
array(1 => CRM_Utils_Money::format($params['amount'], $this->_subscriptionDetails->currency),
2 => $this->_subscriptionDetails->frequency_interval,
3 => $this->_subscriptionDetails->frequency_unit,
- 4 => $params['installments']
+ 4 => $params['installments'],
)
);
$message .= "<br /> " . ts("Recurring contribution amount has been updated from %1 to %2 for this subscription.",
array(
1 => CRM_Utils_Money::format($this->_subscriptionDetails->amount, $this->_subscriptionDetails->currency),
- 2 => CRM_Utils_Money::format($params['amount'], $this->_subscriptionDetails->currency)
+ 2 => CRM_Utils_Money::format($params['amount'], $this->_subscriptionDetails->currency),
)) . ' ';
}
$requiredFields = array(
$contactORContributionId == 'contribution_id' ? 'contribution_id' : 'contribution_contact_id' => $contactORContributionId == 'contribution_id' ? ts('Contribution ID') : ts('Contact ID'),
'total_amount' => ts('Total Amount'),
- 'financial_type' => ts('Financial Type')
+ 'financial_type' => ts('Financial Type'),
);
foreach ($requiredFields as $field => $title) {
$self->_onDuplicate != CRM_Import_Parser::DUPLICATE_UPDATE
) {
$errors['_qf_default'] .= ts('Missing required contact matching fields.') . " $fieldMessage " . ts('(Sum of all weights should be greater than or equal to threshold: %1).', array(
- 1 => $threshold
+ 1 => $threshold,
)) . '<br />';
}
elseif ($self->_onDuplicate == CRM_Import_Parser::DUPLICATE_UPDATE &&
}
else {
$errors['_qf_default'] .= ts('Missing required field: %1', array(
- 1 => $title
+ 1 => $title,
)) . '<br />';
}
}
'title' => ts('Soft Credit'),
'softCredit' => TRUE,
'headerPattern' => '/Soft Credit/i',
- )
+ ),
)
);
'name' => ts('Soft Credit Amount'),
'sort' => 'contribution_soft_credit_amount',
'direction' => CRM_Utils_Sort::DONTCARE,
- )
+ ),
)
);
}
self::$_columnHeaders =
array_merge(
self::$_columnHeaders, array(
- array('desc' => ts('Actions'))
+ array('desc' => ts('Actions')),
)
);
return self::$_columnHeaders;
// CRM-15120
$formatted = array(
'first_name' => $rows[$rowID]['first_name'],
- 'individual_prefix' => $rows[$rowID]['individual_prefix']
+ 'individual_prefix' => $rows[$rowID]['individual_prefix'],
);
$format = CRM_Core_BAO_Setting::getItem(CRM_Core_BAO_Setting::SYSTEM_PREFERENCES_NAME, 'display_name_format');
$firstNameWithPrefix = CRM_Utils_Address::format($formatted, $format, FALSE, FALSE, TRUE);
'email' => array('email'),
'phone' => array('phone'),
'im' => array('name'),
- 'openid' => array('openid')
+ 'openid' => array('openid'),
);
/**
$status .= ' ' . ts('Checked one user record.',
array(
'count' => $contactCount,
- 'plural' => 'Checked %count user records.'
+ 'plural' => 'Checked %count user records.',
)
);
if ($contactMatching) {
$status .= ' ' . ts('Found one matching contact record.',
array(
'count' => $contactMatching,
- 'plural' => 'Found %count matching contact records.'
+ 'plural' => 'Found %count matching contact records.',
)
);
}
$status .= ' ' . ts('Created one new contact record.',
array(
'count' => $contactCreated,
- 'plural' => 'Created %count new contact records.'
+ 'plural' => 'Created %count new contact records.',
)
);
CRM_Core_Session::setStatus($status, ts('Saved'), 'success');
'String',
'Int',
'Float',
- 'Money'
+ 'Money',
))
) {
'Multi-Select Country',
'AdvMulti-Select',
'CheckBox',
- 'Radio'
+ 'Radio',
)));
if ($isSelect) {
$options = CRM_Utils_Array::value('values', civicrm_api3('contact', 'getoptions', array(
'field' => "custom_$fieldId",
- 'context' => $search ? 'search' : 'create'
+ 'context' => $search ? 'search' : 'create',
), array()));
// Consolidate widget types to simplify the below switch statement
$attributes = array(
'rows' => $field->note_rows,
'cols' => $field->note_columns,
- 'data-crm-custom' => $dataCrmCustomVal
+ 'data-crm-custom' => $dataCrmCustomVal,
);
if ($field->text_length) {
$attributes['maxlength'] = $field->text_length;
if (CRM_Utils_Array::value(0, $params['extends']) == 'Relationship') {
$extendsChildType = str_replace(array('_a_b', '_b_a'), array(
'',
- ''
+ '',
), $extendsChildType);
}
if (substr($extendsChildType, 0, 1) != CRM_Core_DAO::VALUE_SEPARATOR) {
'help_pre',
'help_post',
'is_active',
- 'is_multiple'
+ 'is_multiple',
);
foreach ($fields as $field) {
$group->$field = CRM_Utils_Array::value($field, $params, FALSE);
'date_format',
'time_format',
'option_group_id',
- 'in_selector'
+ 'in_selector',
),
'civicrm_custom_group' => array(
'id',
$groupTree['info']['from'][] = $table;
$select = array(
"{$table}.id as {$table}_id",
- "{$table}.entity_id as {$table}_entity_id"
+ "{$table}.entity_id as {$table}_entity_id",
);
foreach ($fields as $column => $dontCare) {
$select[] = "{$table}.{$column} as {$table}_{$column}";
'Multi-Select',
'AdvMulti-Select',
'Select',
- 'Radio'
+ 'Radio',
);
foreach ($groupTree as $group) {
'dd-mm' => "%E%f %B $customTimeFormat",
'yy' => "%Y $customTimeFormat",
'M yy' => "%b %Y $customTimeFormat",
- 'yy-mm' => "%Y-%m $customTimeFormat"
+ 'yy-mm' => "%Y-%m $customTimeFormat",
);
if ($format = CRM_Utils_Array::value('date_format', $field)) {
return CRM_Core_Error::createAPIError(ts('value: %1 is not of the right field data type: %2',
array(
1 => $fieldValue['value'],
- 2 => $dao->data_type
+ 2 => $dao->data_type,
)
));
}
if ($this->_location == NULL) {
$domain = self::getDomain(NULL);
$params = array(
- 'contact_id' => $domain->contact_id
+ 'contact_id' => $domain->contact_id,
);
$this->_location = CRM_Core_BAO_Location::getValues($params, TRUE);
//delete tags from entity tag table
$tagParams = array(
'entity_table' => 'civicrm_file',
- 'entity_id' => $fId
+ 'entity_id' => $fId,
);
CRM_Core_BAO_EntityTag::del($tagParams);
$form->addElement('text', "attachDesc_$i", NULL, array(
'size' => 40,
'maxlength' => 255,
- 'placeholder' => ts('Description')
+ 'placeholder' => ts('Description'),
));
if (!empty($tags)) {
'id' => "tags_$i",
'multiple' => 'multiple',
'class' => 'huge crm-select2',
- 'placeholder' => ts('- none -')
+ 'placeholder' => ts('- none -'),
)
);
}
'description' => $formValues[$attachDesc],
'upload_date' => $now,
'tag' => $tagParams,
- 'attachment_taglist' => CRM_Utils_Array::value($attachFreeTags, $formValues, array())
+ 'attachment_taglist' => CRM_Utils_Array::value($attachFreeTags, $formValues, array()),
);
$params[$attachName] = $fileParams;
'trxn_date' => date('YmdHis'),
'total_amount' => CRM_Utils_Array::value('cost', $params) ? $params['cost'] : 0,
'currency' => CRM_Utils_Array::value('currency', $params),
- 'status_id' => array_search('Completed', $contributionStatuses)
+ 'status_id' => array_search('Completed', $contributionStatuses),
);
$trxnEntityTable['entity_table'] = 'civicrm_contribution';
$trxnEntityTable['entity_id'] = $params['contributionId'];
if (!empty($params['oldPremium'])) {
$premiumParams = array(
- 'id' => $params['oldPremium']['product_id']
+ 'id' => $params['oldPremium']['product_id'],
);
$productDetails = array();
CRM_Contribute_BAO_ManagePremiums::retrieve($premiumParams, $productDetails);
'currency' => CRM_Utils_Array::value('currency', $productDetails),
'financial_type_id' => CRM_Utils_Array::value('financial_type_id', $productDetails),
'contributionId' => $params['oldPremium']['contribution_id'],
- 'isDeleted' => TRUE
+ 'isDeleted' => TRUE,
);
CRM_Core_BAO_FinancialTrxn::createPremiumTrxn($params);
}
'Multi-Select',
'AdvMulti-Select',
'Multi-Select State/Province',
- 'Multi-Select Country'
+ 'Multi-Select Country',
);
// override the operator to handle separator ( note: this might have some performance issues )
array(
1 => $tableName,
2 => $columnName,
- 3 => $customFieldID
+ 3 => $customFieldID,
)
));
}
'city',
'state_province',
'postal_code',
- 'country'
+ 'country',
);
$requiredBillingFields = array_diff($validBillingFields, array('middle_name', 'supplemental_address_1'));
$validProfileFields = array();
elseif (in_array($name, array(
'state_province',
'country',
- 'county'
+ 'county',
))) {
$values[$index] = $details->$name;
$idx = $name . '_id';
'deceased_date',
'membership_start_date',
'membership_end_date',
- 'join_date'
+ 'join_date',
))) {
$values[$index] = CRM_Utils_Date::customFormat($details->$name);
$params[$index] = CRM_Utils_Date::isoToMysql($details->$name);
'phone',
'im',
'email',
- 'openid'
+ 'openid',
))) {
if ($type) {
$detailName .= "-{$type}";
if (in_array($fieldName, array(
'state_province',
'country',
- 'county'
+ 'county',
))) {
$values[$index] = $details->$detailName;
$idx = $detailName . '_id';
'is_update_dupe',
'is_edit_link',
'is_uf_link',
- 'is_cms_user'
+ 'is_cms_user',
);
foreach ($fields as $field) {
$params[$field] = CRM_Utils_Array::value($field, $params, FALSE);
$config = CRM_Core_Config::singleton();
if (!in_array($mode, array(
CRM_Profile_Form::MODE_EDIT,
- CRM_Profile_Form::MODE_SEARCH
+ CRM_Profile_Form::MODE_SEARCH,
)) &&
$config->defaultContactStateProvince
) {
$config = CRM_Core_Config::singleton();
if (!in_array($mode, array(
CRM_Profile_Form::MODE_EDIT,
- CRM_Profile_Form::MODE_SEARCH
+ CRM_Profile_Form::MODE_SEARCH,
)) &&
$config->defaultContactCountry
) {
}
$form->add('select', $providerName, NULL,
array(
- '' => ts('- select -')
+ '' => ts('- select -'),
) + CRM_Core_PseudoConstant::get('CRM_Core_DAO_IM', 'provider_id'), $required
);
}
else {
$form->add('select', $name . '-provider_id', $title,
array(
- '' => ts('- select -')
+ '' => ts('- select -'),
) + CRM_Core_PseudoConstant::get('CRM_Core_DAO_IM', 'provider_id'), $required
);
}
elseif (in_array($fieldName, array(
'membership_start_date',
'membership_end_date',
- 'join_date'
+ 'join_date',
))) {
$form->addDate($name, $title, $required, array('formatType' => 'custom'));
}
elseif (CRM_Utils_Array::value('name', $field) == 'membership_status') {
$form->add('select', $name, $title,
array(
- '' => ts('- select -')
+ '' => ts('- select -'),
) + CRM_Member_PseudoConstant::membershipStatus(NULL, NULL, 'label'), $required
);
}
'Contact',
'Contribution',
'Participant',
- 'Membership'
+ 'Membership',
))
) {
$profileType = 'Individual';
);
$form->add('select', $name, $title,
array(
- '' => ts('- select -')
+ '' => ts('- select -'),
) + CRM_Core_PseudoConstant::greeting($greeting), $required
);
// add custom greeting element
'receive_date',
'receipt_date',
'thankyou_date',
- 'cancel_date'
+ 'cancel_date',
))) {
$form->addDateTime($name, $title, $required, array('formatType' => 'activityDateTime'));
}
list($products, $options) = CRM_Contribute_BAO_Premium::getPremiumProductInfo();
$sel = &$form->addElement('hierselect', $name, $title);
$products = array(
- '0' => ts('- select -')
+ '0' => ts('- select -'),
) + $products;
$sel->setOptions(array($products, $options));
}
elseif ($fieldName == 'financial_type') {
$form->add('select', $name, $title,
array(
- '' => ts('- select -')
+ '' => ts('- select -'),
) + CRM_Contribute_PseudoConstant::financialType(), $required
);
}
foreach (array(
'In Progress',
'Overdue',
- 'Refunded'
+ 'Refunded',
) as $suppress) {
unset($contributionStatuses[CRM_Utils_Array::key($suppress, $statusName)]);
}
$form->add('select', $name, $title,
array(
- '' => ts('- select -')
+ '' => ts('- select -'),
) + $contributionStatuses, $required
);
}
$name = "soft_credit_type[$rowNumber]";
$form->add('select', $name, $title,
array(
- '' => ts('- select -')
+ '' => ts('- select -'),
) + CRM_Core_OptionGroup::values("soft_credit_type")
);
//CRM-15350: choose SCT field default value as 'Gift' for membership use
elseif ($fieldName == 'contribution_page_id') {
$form->add('select', $name, $title,
array(
- '' => ts('- select -')
+ '' => ts('- select -'),
) + CRM_Contribute_PseudoConstant::contributionPage(), $required, 'class="big"'
);
}
elseif ($fieldName == 'activity_status_id') {
$form->add('select', $name, $title,
array(
- '' => ts('- select -')
+ '' => ts('- select -'),
) + CRM_Core_PseudoConstant::activityStatus(), $required
);
}
elseif ($fieldName == 'activity_engagement_level') {
$form->add('select', $name, $title,
array(
- '' => ts('- select -')
+ '' => ts('- select -'),
) + CRM_Campaign_PseudoConstant::engagementLevel(), $required
);
}
}
$form->add('select', $name, $title,
array(
- '' => ts('- select -')
+ '' => ts('- select -'),
) + CRM_Event_PseudoConstant::participantStatus(NULL, $cond, 'label'), $required
);
}
else {
$form->add('select', $name, $title,
array(
- '' => ts('- select -')
+ '' => ts('- select -'),
) + CRM_Event_PseudoConstant::participantRole(), $required
);
}
));
$form->add('select', $name, $title,
array(
- '' => ts('- select -')
+ '' => ts('- select -'),
) + $campaigns, $required, 'class="crm-select2 big"'
);
}
'non_deductible_amount',
'total_amount',
'fee_amount',
- 'net_amount'
+ 'net_amount',
))) {
$form->addRule($name, ts('Please enter a valid amount.'), 'money');
}
'Contact',
'Individual',
'Organization',
- 'Household'
+ 'Household',
), $componentGroupTypes, CRM_Contact_BAO_ContactType::subTypes());
$gTypes = $gTypeValues = array();
'thankyou_date',
'membership_start_date',
'membership_end_date',
- 'join_date'
+ 'join_date',
);
foreach ($fields as $name => $field) {
$fldName = $isStandalone ? $name : "field[$componentId][$name]";
'financial_type',
'payment_instrument',
'participant_status',
- 'participant_role'
+ 'participant_role',
))) {
$defaults[$fldName] = $values["{$name}_id"];
}
1 => $ufmatch->contact_id,
2 => $uf,
3 => $ufmatch->uf_id,
- 4 => $conflict
+ 4 => $conflict,
)
);
unset($conflict);
$include_paths = array(
'.',
$civicrm_base_path,
- $packages_path
+ $packages_path,
);
$include_paths = implode(PATH_SEPARATOR, $include_paths);
set_include_path($include_paths . PATH_SEPARATOR . get_include_path());
$url = CRM_Utils_System::url('civicrm/admin/setting/path', 'reset=1');
CRM_Core_Session::setStatus(ts('%1 has an incorrect directory path. Please go to the <a href="%2">path setting page</a> and correct it.', array(
1 => $key,
- 2 => $url
+ 2 => $url,
)), ts('Check Settings'), 'alert');
}
}
'id_field' => 'select_contact_id',
'placeholder' => ts('Select someone else ...'),
'show_hide' => TRUE,
- 'api' => array('params' => array('contact_type' => 'Individual'))
+ 'api' => array('params' => array('contact_type' => 'Individual')),
), $autoCompleteField);
if ($this->canUseAjaxContactLookups()) {
'thursday' => 'Thursday',
'friday' => 'Friday',
'saturday' => 'Saturday',
- 'sunday' => 'Sunday'
+ 'sunday' => 'Sunday',
);
$form->add('select', 'repetition_frequency_unit', ts('Repeats:'), $freqUnitsDisplay);
$numericOptions = CRM_Core_SelectValues::getNumericOptions(1, 30);
'second' => 'Second',
'third' => 'Third',
'fourth' => 'Fourth',
- 'last' => 'Last'
+ 'last' => 'Last',
);
$form->add('select', 'entity_status_1', ts(''), $dayOfTheWeekNo);
$form->add('select', 'entity_status_2', ts(''), $dayOfTheWeek);
),
array(
'type' => 'cancel',
- 'name' => ts('Cancel')
+ 'name' => ts('Cancel'),
),
)
);
'name' => $type . '_repeat_exclude_dates_' . $actionScheduleObj->entity_value,
'title' => $type . ' recursion',
'is_reserved' => 0,
- 'is_active' => 1
+ 'is_active' => 1,
);
$opGroup = CRM_Core_BAO_OptionGroup::add($optionGroupParams);
if ($opGroup->id) {
'name' => $opGroup->name,
'description' => 'Used for recurring ' . $type,
'weight' => CRM_Utils_Weight::updateOtherWeights('CRM_Core_DAO_OptionValue', $oldWeight, CRM_Utils_Array::value('weight', $params), $fieldValues),
- 'is_active' => 1
+ 'is_active' => 1,
);
$excludeDateList[] = $optionGroupValue['value'];
CRM_Core_BAO_OptionValue::add($optionGroupValue);
if ($fresh || self::$singleton === NULL) {
$indices = array(
'civicrm_address' => array(
- array('street_address', 'city', 'postal_code')
+ array('street_address', 'city', 'postal_code'),
),
'civicrm_activity' => array(
array('subject', 'details'),
array('source', 'amount_level', 'trxn_Id', 'invoice_id'),
),
'civicrm_email' => array(
- array('email')
+ array('email'),
),
'civicrm_membership' => array(
array('source'),
case 'unused':
$getRefCount = civicrm_api3($dao->entity_type, 'getrefcount', array(
'debug' => 1,
- 'id' => $dao->entity_id
+ 'id' => $dao->entity_id,
));
$total = 0;
}
CRM_Core_DAO::executeQuery('DELETE FROM civicrm_managed WHERE id = %1', array(
- 1 => array($dao->id, 'Integer')
+ 1 => array($dao->id, 'Integer'),
));
}
}
'attributes' => array(
'size' => 20,
'maxlength' => 20,
- 'autocomplete' => 'off'
+ 'autocomplete' => 'off',
),
'is_required' => TRUE,
),
'attributes' => array(
'size' => 5,
'maxlength' => 10,
- 'autocomplete' => 'off'
+ 'autocomplete' => 'off',
),
'is_required' => CRM_Core_BAO_Setting::getItem(CRM_Core_BAO_Setting::CONTRIBUTE_PREFERENCES_NAME,
'cvv_backoffice_required',
'attributes' => array(
'size' => 20,
'maxlength' => 34,
- 'autocomplete' => 'on'
+ 'autocomplete' => 'on',
),
'is_required' => TRUE,
),
'attributes' => array(
'size' => 20,
'maxlength' => 34,
- 'autocomplete' => 'off'
+ 'autocomplete' => 'off',
),
'rules' => array(
array(
'attributes' => array(
'size' => 20,
'maxlength' => 11,
- 'autocomplete' => 'off'
+ 'autocomplete' => 'off',
),
'is_required' => TRUE,
'rules' => array(
'attributes' => array(
'size' => 20,
'maxlength' => 64,
- 'autocomplete' => 'off'
+ 'autocomplete' => 'off',
),
'is_required' => TRUE,
- )
+ ),
);
}
public function transactionExists($trxn_id) {
if (CRM_Core_DAO::singleValueQuery("SELECT count(*) FROM civicrm_contribution WHERE trxn_id = %1",
array(
- 1 => array($trxn_id, 'String')
+ 1 => array($trxn_id, 'String'),
))) {
return TRUE;
}
array(
1 => xml_get_error_code($xmlparser),
2 => xml_get_current_line_number($xmlparser),
- 3 => xml_get_current_column_number($xmlparser)
+ 3 => xml_get_current_column_number($xmlparser),
)
);
}
static $permissions = array();
if (empty($permissions)) {
$permissions = array(
- 'administer CiviCRM'
+ 'administer CiviCRM',
);
$components = CRM_Core_Component::getComponents();
foreach ($components as $comp) {
public function findReferences($targetDao) {
$targetColumn = $this->getTargetKey();
$params = array(
- 1 => array($targetDao->$targetColumn, 'String')
+ 1 => array($targetDao->$targetColumn, 'String'),
);
$sql = <<<EOS
SELECT id
public function getReferenceCount($targetDao) {
$targetColumn = $this->getTargetKey();
$params = array(
- 1 => array($targetDao->$targetColumn, 'String')
+ 1 => array($targetDao->$targetColumn, 'String'),
);
$sql = <<<EOS
SELECT count(id)
'type' => get_class($this),
'table' => $this->getReferenceTable(),
'key' => $this->getReferenceKey(),
- 'count' => CRM_Core_DAO::singleValueQuery($sql, $params)
+ 'count' => CRM_Core_DAO::singleValueQuery($sql, $params),
);
}
}
'type' => get_class($this),
'table' => $this->getReferenceTable(),
'key' => $this->getReferenceKey(),
- 'count' => CRM_Core_DAO::singleValueQuery($sql, $params)
+ 'count' => CRM_Core_DAO::singleValueQuery($sql, $params),
);
}
'automatic' => ts("Automatic"),
'location-only' => ts("Only send to email addresses assigned to the specified location"),
'location-prefer' => ts("Prefer email addresses assigned to the specified location"),
- 'location-exclude' => ts("Exclude email addresses assigned to the specified location")
+ 'location-exclude' => ts("Exclude email addresses assigned to the specified location"),
);
}
return array(
ts('No auto-renew option'),
ts('Give option, but not required'),
- ts('Auto-renew required')
+ ts('Auto-renew required'),
);
}
'{event.fee_amount}' => ts('Event Fees'),
'{event.info_url}' => ts('Event Info URL'),
'{event.registration_url}' => ts('Event Registration URL'),
- '{event.balance}' => ts('Event Balance')
+ '{event.balance}' => ts('Event Balance'),
);
}
ts('Used For'),
array(
'name' => 'extends[0]',
- 'style' => 'vertical-align: top;'
+ 'style' => 'vertical-align: top;',
),
TRUE
);
array(
1 => $this->_srcFieldLabel,
2 => $dstGroup,
- 3 => $srcUrl
+ 3 => $srcUrl,
)), '', 'success');
}
}
array(
1 => $block,
2 => $count,
- 3 => $allLocationTypes[$locTypeId]
+ 3 => $allLocationTypes[$locTypeId],
)
);
'start_date' => CRM_Utils_Date::isoToMysql($dao->start_date),
'end_date' => CRM_Utils_Date::isoToMysql($dao->end_date),
'source' => $dao->source,
- 'status_id' => $dao->status_id
+ 'status_id' => $dao->status_id,
);
// create/update membership(s) for related contact(s)
CRM_Member_BAO_Membership::createRelatedMemberships($membershipParams, $dao);
$addressValues = CRM_Core_BAO_Location::getValues($params, TRUE);
$location['address'] = str_replace(array(
"\r",
- "\n"
+ "\n",
), '', addslashes(nl2br($addressValues['address'][1]['display_text'])));
$location['url'] = CRM_Utils_System::url('civicrm/event/register', 'reset=1&id=' . $dao->event_id);
'is_show_location',
'default_fee_id',
'default_discount_fee_id',
- 'is_template'
+ 'is_template',
);
CRM_Core_DAO::commonRetrieve('CRM_Event_DAO_Event', $eventParams, $eventValues, $returnProperties);
elseif (in_array($name, array(
'addressee',
'email_greeting',
- 'postal_greeting'
+ 'postal_greeting',
))) {
$filterCondition = array('greeting_type' => $name);
$greeting = CRM_Core_PseudoConstant::greeting($filterCondition);
if (in_array($fieldName, array(
'state_province',
'country',
- 'county'
+ 'county',
))) {
$values[$index] = $params[$detailName];
$idx = $detailName . '_id';
elseif (in_array($name, array(
'birth_date',
'deceased_date',
- 'participant_register_date'
+ 'participant_register_date',
))) {
$values[$index] = CRM_Utils_Date::customFormat(CRM_Utils_Date::format($params[$name]));
}
$hasNoteField = FALSE;
foreach (array(
'note',
- 'participant_note'
+ 'participant_note',
) as $noteFld) {
if (array_key_exists($noteFld, $params)) {
$noteValue = $params[$noteFld];
'title' => ts('Participant Note'),
'name' => 'participant_note',
'headerPattern' => '/(participant.)?note$/i',
- )
+ ),
);
// Split status and status id into 2 fields
'title' => ts('Participant Status'),
'name' => 'participant_status',
'data_type' => CRM_Utils_Type::T_STRING,
- )
+ ),
);
$tmpFields['participant_status_id']['title'] = ts('Participant Status Id');
'title' => ts('Participant Role'),
'name' => 'participant_role',
'data_type' => CRM_Utils_Type::T_STRING,
- )
+ ),
);
$tmpFields['participant_role_id']['title'] = ts('Participant Role Id');
'title' => ts('Event Type'),
'name' => 'event_type',
'data_type' => CRM_Utils_Type::T_STRING,
- )
+ ),
);
$tmpContactField = $contactFields = array();
'participant_note' => array(
'title' => 'Participant Note',
'name' => 'participant_note',
- )
+ ),
);
$participantStatus = array(
'participant_status' => array(
'title' => 'Participant Status',
'name' => 'participant_status',
- )
+ ),
);
$participantRole = array(
'participant_role' => array(
'title' => 'Participant Role',
'name' => 'participant_role',
- )
+ ),
);
//CRM-13595 add event id to participant export
'event_id' => array(
'title' => 'Event ID',
'name' => 'event_id',
- )
+ ),
);
$eventtitle = array(
'event_title' => array(
'title' => 'Event Title',
'name' => 'event_title',
- )
+ ),
);
$discountFields = CRM_Core_DAO_Discount::export();
if (is_string($emptySeats) && $emptySeats !== NULL) {
$maxParticipants = CRM_Core_DAO::getFieldValue('CRM_Event_DAO_Event', $eventId, 'max_participants');
$eventfullMsg = ts("This event currently has the maximum number of participants registered (%1). However, you can still override this limit and register additional participants using this form.", array(
- 1 => $maxParticipants
+ 1 => $maxParticipants,
)) . '<br />';
}
// get additional participant ids (including cancelled)
if ($participantId) {
$ids = array_merge(array(
- $participantId
+ $participantId,
), self::getAdditionalParticipantIds($participantId,
$excludeCancelled
));
WHERE cpf.price_set_id = %1 AND cpfv.label LIKE %2";
$params = array(
1 => array($priceSetId, 'Integer'),
- 2 => array($feeLevel, 'String')
+ 2 => array($feeLevel, 'String'),
);
$mainAmount = CRM_Core_DAO::singleValueQuery($query, $params);
$relationTypeId = key(CRM_Core_PseudoConstant::accountOptionValues('account_relationship', NULL, " AND v.name LIKE 'Discounts Account is' "));
'payment_instrument_id' => $updatedContribution->payment_instrument_id,
'contribution_id' => $updatedContribution->id,
'trxn_date' => date('YmdHis'),
- 'currency' => $updatedContribution->currency
+ 'currency' => $updatedContribution->currency,
);
$adjustedTrxn = CRM_Core_BAO_FinancialTrxn::create($adjustedTrxnValues);
}
'value' => CRM_Utils_Rule::cleanMoney(trim($values[$i])),
'weight' => $i,
'is_active' => 1,
- 'is_default' => $default == $i
+ 'is_default' => $default == $i,
);
}
}
'value' => CRM_Utils_Rule::cleanMoney(trim($values[$i][$j])),
'weight' => $i,
'is_active' => 1,
- 'is_default' => $default == $i
+ 'is_default' => $default == $i,
);
}
}
'table' => 'civicrm_price_set_entity',
'findCriteria' => array(
'entity_id' => $this->_id,
- 'entity_table' => 'civicrm_event'
+ 'entity_table' => 'civicrm_event',
),
'linkedColumns' => array('entity_id'),
'isRecurringEntityRecord' => FALSE,
'table' => 'civicrm_uf_join',
'findCriteria' => array(
'entity_id' => $this->_id,
- 'entity_table' => 'civicrm_event'
+ 'entity_table' => 'civicrm_event',
),
'linkedColumns' => array('entity_id'),
'isRecurringEntityRecord' => FALSE,
'table' => 'civicrm_tell_friend',
'findCriteria' => array(
'entity_id' => $this->_id,
- 'entity_table' => 'civicrm_event'
+ 'entity_table' => 'civicrm_event',
),
'linkedColumns' => array('entity_id'),
'isRecurringEntityRecord' => TRUE,
'table' => 'civicrm_pcp_block',
'findCriteria' => array(
'entity_id' => $this->_id,
- 'entity_table' => 'civicrm_event'
+ 'entity_table' => 'civicrm_event',
),
'linkedColumns' => array('entity_id'),
'isRecurringEntityRecord' => TRUE,
'select' => array('minimumInputLength' => 0),
'api' => array(
'extra' => array('campaign_id', 'default_role_id', 'event_type_id'),
- )
+ ),
);
if ($this->_mode) {
$path = CRM_Utils_System::currentPath();
$excludeForPaths = array(
'civicrm/contact/search',
- 'civicrm/group/search'
+ 'civicrm/group/search',
);
if (!in_array($path, $excludeForPaths)) {
$buttons[] = array(
$buttons[] = array(
'type' => 'upload',
'name' => ts('Save and Record Payment'),
- 'subName' => 'new'
+ 'subName' => 'new',
);
}
$buttons[] = array(
$profileAddressFields = array();
foreach ($this->_fields as $key => $value) {
CRM_Core_BAO_UFField::assignAddressField($key, $profileAddressFields, array(
- 'uf_group_id' => $this->_values['custom_pre_id']
+ 'uf_group_id' => $this->_values['custom_pre_id'],
));
}
$this->set('profileAddressFields', $profileAddressFields);
'componentName' => 'Event',
'contribution_id' => $contributionId,
'contribution_status_id' => $contributionStatusId,
- 'skipComponentSync' => 1
+ 'skipComponentSync' => 1,
);
//change related contribution status.
if (!empty($formatted['fee_level'])) {
$otherParams = array(
'fee_label' => $formatted['fee_level'],
- 'event_id' => $newParticipant->event_id
+ 'event_id' => $newParticipant->event_id,
);
CRM_Price_BAO_LineItem::syncLineItems($newParticipant->id, 'civicrm_participant', $newParticipant->fee_amount, $otherParams);
}
'qs' => 'reset=1&action=copy&id=%%id%%',
'extra' => 'onclick = "return confirm(\'' . $copyExtra . '\');"',
'title' => ts('Copy Event'),
- )
+ ),
);
}
return self::$_actionLinks;
array(
'title' => ts('Info and Settings'),
'url' => 'civicrm/event/manage/settings',
- 'field' => 'id'
+ 'field' => 'id',
);
self::$_tabLinks[$cacheKey]['location'] =
array(
elseif (is_object($relDAO) && in_array($relationField, array(
'email_greeting',
'postal_greeting',
- 'addressee'
+ 'addressee',
))
) {
//special case for greeting replacement
elseif (in_array($field, array(
'email_greeting',
'postal_greeting',
- 'addressee'
+ 'addressee',
))) {
//special case for greeting replacement
$fldValue = "{$field}_display";
$changeFields = array(
'groups',
'tags',
- 'notes'
+ 'notes',
);
if (in_array($fieldName, $changeFields)) {
'contact_is_deleted' => 'is_deleted',
'name' => 'address_name',
'provider_id' => 'im_service_provider',
- 'phone_type_id' => 'phone_type'
+ 'phone_type_id' => 'phone_type',
);
//figure out which columns are to be replaced by which ones
//1 => $this->containerDir,
1 => $url,
)
- )
+ ),
);
}
'entity_table' => 'civicrm_payment_processor',
'entity_id' => $processor->id,
'account_relationship' => $relationTypeId,
- 'financial_account_id' => $params['financial_account_id']
+ 'financial_account_id' => $params['financial_account_id'],
);
CRM_Financial_BAO_FinancialTypeAccount::add($values);
}
'type' => 'submit',
'name' => ts('Search'),
'isDefault' => TRUE,
- )
+ ),
)
);
'ref' => 'disable-action',
'title' => ts('Assign Transaction'),
'extra' => 'onclick = "assignRemove( %%id%%,\'' . 'assign' . '\' );"',
- )
+ ),
);
}
return self::$_links;
$relationshipId = key(CRM_Core_PseudoConstant::accountOptionValues('account_relationship', NULL, " AND v.name LIKE 'Sales Tax Account is' "));
$params = array(
'financial_account_id' => $self->_id,
- 'account_relationship' => $relationshipId
+ 'account_relationship' => $relationshipId,
);
$result = CRM_Financial_BAO_FinancialTypeAccount::retrieve($params, $defaults);
if ($result) {
array(
'title' => ts('Financial Type Accounts'),
'url' => $url,
- )
+ ),
);
CRM_Utils_System::appendBreadCrumb($breadCrumb);
}
'6' => 1, //Asset
'7' => 4, //cost of sales
'8' => 1, //premium inventory
- '9' => 3 //discount account is
+ '9' => 3 //discount account is,
);
$financialAccountType = CRM_Utils_Array::value($this->_submitValues['account_relationship'], $financialAccountType);
}
else {
$financialAccountSelect = array(
- 'select' => ts('- select -')
+ 'select' => ts('- select -'),
) + CRM_Contribute_PseudoConstant::financialAccount();
}
}
'6' => 1, //Asset
'7' => 4, //cost of sales
'8' => 1, //premium inventory
- '9' => 3 //discount account is
+ '9' => 3 //discount account is,
);
$financialAccountType = $financialAccountType[$this->_defaultValues['account_relationship']];
array(
'type' => 'next',
'name' => ts('Save'),
- 'isDefault' => TRUE
+ 'isDefault' => TRUE,
),
array(
'type' => 'next',
'name' => ts('Save and New'),
- 'subName' => 'new'
+ 'subName' => 'new',
),
array(
'type' => 'cancel',
- 'name' => ts('Cancel')
+ 'name' => ts('Cancel'),
))
);
$this->addFormRule(array('CRM_Financial_Form_FinancialTypeAccount', 'formRule'), $this);
if (!empty($values['account_relationship']) && !empty($values['financial_account_id'])) {
$params = array(
'account_relationship' => $values['account_relationship'],
- 'entity_id' => $self->_aid
+ 'entity_id' => $self->_aid,
);
$defaults = array();
if ($self->_action == CRM_Core_Action::ADD) {
'type' => 'refresh',
'name' => ts('Search'),
'isDefault' => TRUE,
- )
+ ),
)
);
parent::buildQuickForm();
array(
'name' => ts('- select -'),
'value' => 'select',
- )
+ ),
);
if (!empty($result)) {
array(
'name' => ts('- Select Financial Account Relationship -'),
'value' => 'select',
- )
+ ),
);
$countResult = count($financialAccountType[$financialAccountTypeId]);
array(
'id' => $financialItem->id,
'contid' => $financialItem->contributionID,
- 'cid' => $financialItem->contact_id
+ 'cid' => $financialItem->contact_id,
),
ts('more'),
FALSE,
array(
'id' => $financialItem->id,
'contid' => $financialItem->contributionID,
- 'cid' => $financialItem->contact_id
+ 'cid' => $financialItem->contact_id,
),
ts('more'),
FALSE,
array(
'id' => $financialItem->id,
'contid' => $financialItem->contributionID,
- 'cid' => $financialItem->contact_id
+ 'cid' => $financialItem->contact_id,
),
ts('more'),
FALSE,
'title' => ts('Accounting Batches'),
'url' => CRM_Utils_System::url('civicrm/financial/financialbatches',
"reset=1&batchStatus=$statusID"),
- )
+ ),
);
CRM_Utils_System::appendBreadCrumb($breadCrumb);
$targetParams = array(
'activity_id' => $activity->id,
'contact_id' => $contact,
- 'record_type_id' => $targetID
+ 'record_type_id' => $targetID,
);
// See if it already exists
'entity_table' => TRUE,
'bracket_info' => array(
'table' => 'log_civicrm_note',
- 'column' => 'subject'
+ 'column' => 'subject',
),
),
'log_civicrm_note_comment' => array(
'table_name' => 'log_civicrm_note',
'joins' => array(
'table' => 'log_civicrm_note',
- 'join' => "entity_log_civireport.entity_id = fk_table.id AND entity_log_civireport.entity_table = 'civicrm_note'"
+ 'join' => "entity_log_civireport.entity_id = fk_table.id AND entity_log_civireport.entity_table = 'civicrm_note'",
),
'entity_table' => TRUE,
'bracket_info' => array(
'table' => 'log_civicrm_note',
- 'column' => 'subject'
+ 'column' => 'subject',
),
),
'log_civicrm_group_contact' => array(
'bracket_info' => array(
'entity_column' => 'group_id',
'table' => 'log_civicrm_group',
- 'column' => 'title'
+ 'column' => 'title',
),
'action_column' => 'status',
'log_type' => 'Group',
'bracket_info' => array(
'entity_column' => 'tag_id',
'table' => 'log_civicrm_tag',
- 'column' => 'name'
+ 'column' => 'name',
),
- 'entity_table' => TRUE
+ 'entity_table' => TRUE,
),
'log_civicrm_relationship' => array(
'fk' => 'contact_id_a',
'bracket_info' => array(
'entity_column' => 'relationship_type_id',
'table' => 'log_civicrm_relationship_type',
- 'column' => 'label_a_b'
+ 'column' => 'label_a_b',
),
),
'log_civicrm_activity_for_target' => array(
'table_name' => 'log_civicrm_activity',
'joins' => array(
'table' => 'log_civicrm_activity_contact',
- 'join' => "(entity_log_civireport.id = fk_table.activity_id AND fk_table.record_type_id = {$targetID})"
+ 'join' => "(entity_log_civireport.id = fk_table.activity_id AND fk_table.record_type_id = {$targetID})",
),
'bracket_info' => array(
'entity_column' => 'activity_type_id',
- 'options' => CRM_Core_PseudoConstant::activityType(TRUE, TRUE, FALSE, 'label', TRUE)
+ 'options' => CRM_Core_PseudoConstant::activityType(TRUE, TRUE, FALSE, 'label', TRUE),
),
'log_type' => 'Activity',
),
'table_name' => 'log_civicrm_activity',
'joins' => array(
'table' => 'log_civicrm_activity_contact',
- 'join' => "entity_log_civireport.id = fk_table.activity_id AND fk_table.record_type_id = {$assigneeID}"
+ 'join' => "entity_log_civireport.id = fk_table.activity_id AND fk_table.record_type_id = {$assigneeID}",
),
'bracket_info' => array(
'entity_column' => 'activity_type_id',
- 'options' => CRM_Core_PseudoConstant::activityType(TRUE, TRUE, FALSE, 'label', TRUE)
+ 'options' => CRM_Core_PseudoConstant::activityType(TRUE, TRUE, FALSE, 'label', TRUE),
),
'log_type' => 'Activity',
),
'table_name' => 'log_civicrm_activity',
'joins' => array(
'table' => 'log_civicrm_activity_contact',
- 'join' => "entity_log_civireport.id = fk_table.activity_id AND fk_table.record_type_id = {$sourceID}"
+ 'join' => "entity_log_civireport.id = fk_table.activity_id AND fk_table.record_type_id = {$sourceID}",
),
'bracket_info' => array(
'entity_column' => 'activity_type_id',
- 'options' => CRM_Core_PseudoConstant::activityType(TRUE, TRUE, FALSE, 'label', TRUE)
+ 'options' => CRM_Core_PseudoConstant::activityType(TRUE, TRUE, FALSE, 'label', TRUE),
),
'log_type' => 'Activity',
),
'fk' => 'contact_id',
'joins' => array(
'table' => 'log_civicrm_case_contact',
- 'join' => 'entity_log_civireport.id = fk_table.case_id'
+ 'join' => 'entity_log_civireport.id = fk_table.case_id',
),
'bracket_info' => array(
'entity_column' => 'case_type_id',
- 'options' => CRM_Case_PseudoConstant::caseType('title', FALSE)
+ 'options' => CRM_Case_PseudoConstant::caseType('title', FALSE),
),
),
);
foreach ($customTables as $table) {
$this->_logTables[$table] = array(
'fk' => 'entity_id',
- 'log_type' => 'Contact'
+ 'log_type' => 'Contact',
);
}
'fk' => 'contact_id',// for join of fk_table with contact table
'joins' => array(
'table' => 'log_civicrm_address', // fk_table
- 'join' => 'entity_log_civireport.entity_id = fk_table.id'
+ 'join' => 'entity_log_civireport.entity_id = fk_table.id',
),
- 'log_type' => 'Contact'
+ 'log_type' => 'Contact',
);
}
$sql = str_replace('modified_contact_civireport.id', 'entity_log_civireport.altered_contact_id', $sql);
$sql = str_replace(array(
'modified_contact_civireport.',
- 'altered_by_contact_civireport.'
+ 'altered_by_contact_civireport.',
), 'entity_log_civireport.', $sql);
$this->buildRows($sql, $rows);
$entityID = CRM_Core_DAO::singleValueQuery($sql, array(
1 => array(
CRM_Utils_Date::isoToMysql($logDate),
- 'Timestamp'
+ 'Timestamp',
),
- 2 => array($id, 'Integer')
+ 2 => array($id, 'Integer'),
));
}
else {
WHERE log_date <= %1 AND id = %2 ORDER BY log_date DESC LIMIT 1";
return CRM_Core_DAO::singleValueQuery($sql, array(
1 => array(CRM_Utils_Date::isoToMysql($logDate), 'Timestamp'),
- 2 => array($entityID, 'Integer')
+ 2 => array($entityID, 'Integer'),
));
}
else {
$sql = "select {$this->_logTables[$entity]['action_column']} from `{$this->loggingDB}`.{$entity} where id = %1 AND log_conn_id = %2";
$newAction = CRM_Core_DAO::singleValueQuery($sql, array(
1 => array($id, 'Integer'),
- 2 => array($connId, 'Integer')
+ 2 => array($connId, 'Integer'),
));
switch ($entity) {
'COLUMN_NAME' => $dao->COLUMN_NAME,
'DATA_TYPE' => $dao->DATA_TYPE,
'IS_NULLABLE' => $dao->IS_NULLABLE,
- 'COLUMN_DEFAULT' => $dao->COLUMN_DEFAULT
+ 'COLUMN_DEFAULT' => $dao->COLUMN_DEFAULT,
);
}
}
'url' => 'civicrm/mailing/report',
'qs' => "mid=%%mid%%&reset=1&cid=%%cid%%&context=mailing",
'title' => ts('View Mailing Report'),
- )
+ ),
);
$mailingKey = $values['mailing_id'];
'mailing_job_end_date' => 1,
'contact_type' => 1,
'contact_sub_type' => 1,
- 'mailing_recipients_id' => 1
+ 'mailing_recipients_id' => 1,
);
}
return $properties;
'Complete' => 'Complete',
'Scheduled' => 'Scheduled',
'Running' => 'Running',
- 'Canceled' => 'Canceled'
+ 'Canceled' => 'Canceled',
);
$form->addElement('select', 'mailing_job_status', ts('Mailing Job Status'), $mailingJobStatuses, FALSE);
$component = CRM_Mailing_BAO_Component::add($params);
CRM_Core_Session::setStatus(ts('The mailing component \'%1\' has been saved.', array(
- 1 => $component->name
+ 1 => $component->name,
)
), ts('Saved'), 'success');
$mailingGroups = array(
'civicrm_group' => array(),
- 'civicrm_mailing' => array()
+ 'civicrm_mailing' => array(),
);
$dao->mailing_id = $this->_mailingID;
$dao->find();
'email_on_hold',
'contact_opt_out',
'mailing_job_status',
- 'mailing_job_end_date'
+ 'mailing_job_end_date',
);
/**
if (!empty($params['relate_contribution_id'])) {
CRM_Member_BAO_MembershipPayment::create(array(
'membership_id' => $membership->id,
- 'contribution_id' => $params['relate_contribution_id']
+ 'contribution_id' => $params['relate_contribution_id'],
));
}
$statusANDType = self::getStatusANDTypeValues($membership->id);
foreach (array(
'status',
- 'membership_type'
+ 'membership_type',
) as $fld) {
$defaults[$fld] = CRM_Utils_Array::value($fld, $statusANDType[$membership->id]);
}
'membership_type',
'membership_type_id',
'is_current_member',
- 'relationship_type_id'
+ 'relationship_type_id',
);
while ($dao->fetch()) {
foreach ($properties as $property) {
'Membership Renewal',
'Change Membership Status',
'Change Membership Type',
- 'Membership Renewal Reminder'
+ 'Membership Renewal Reminder',
);
foreach ($membershipActivities as $membershipActivity) {
$activityId = array_search($membershipActivity, $activityTypes);
'name' => 'membership_status',
'type' => CRM_Utils_Type::T_STRING,
'where' => 'civicrm_membership_status.name',
- )
+ ),
);
//CRM-6161 fix for customdata export
$fields = array_merge($fields, $membershipStatus, CRM_Core_BAO_CustomField::getFieldsForImport('Membership'));
try {
civicrm_api3('contribution', 'completetransaction', array(
'id' => $membershipContribution->id,
- 'trxn_id' => $membershipContribution->trxn_id
+ 'trxn_id' => $membershipContribution->trxn_id,
));
}
catch (CiviCRM_API3_Exception $e) {
public static function linkMembershipPayment($membership, $membershipContribution) {
CRM_Member_BAO_MembershipPayment::create(array(
'membership_id' => $membership->id,
- 'contribution_id' => $membershipContribution->id
+ 'contribution_id' => $membershipContribution->id,
));
}
array(
'membership_id' => $dao->membership_id,
'version' => 3,
- 'ignore_admin_only' => FALSE
+ 'ignore_admin_only' => FALSE,
), TRUE
);
$statusId = CRM_Utils_Array::value('id', $newStatus);
$result['is_error'] = 0;
$result['messages'] = ts('Processed %1 membership records. Updated %2 records.', array(
1 => $processCount,
- 2 => $updateCount
+ 2 => $updateCount,
));
return $result;
}
'is_pay_later',
'membership_id',
'tax_amount',
- 'skipLineItem'
+ 'skipLineItem',
);
foreach ($recordContribution as $f) {
$contributionParams[$f] = CRM_Utils_Array::value($f, $params);
if (empty($ids['contribution']) || !empty($params['is_recur'])) {
CRM_Member_BAO_MembershipPayment::create(array(
'membership_id' => $membershipId,
- 'contribution_id' => $contribution->id
+ 'contribution_id' => $contribution->id,
));
}
return $contribution;
TRUE
)
),
- 'Integer'
+ 'Integer',
),
3 => array($isTest, 'Boolean'),
);
array(
'type' => 'upload',
'name' => ts('Renew'),
- 'isDefault' => TRUE
+ 'isDefault' => TRUE,
),
array(
'type' => 'cancel',
- 'name' => ts('Cancel')
- )
+ 'name' => ts('Cancel'),
+ ),
)
);
}
array(
'type' => 'next',
'name' => ts('Delete'),
- 'isDefault' => TRUE
+ 'isDefault' => TRUE,
),
array(
'type' => 'cancel',
- 'name' => ts('Cancel')
- )
+ 'name' => ts('Cancel'),
+ ),
)
);
}
array(
'type' => 'upload',
'name' => ts('Save'),
- 'isDefault' => TRUE
+ 'isDefault' => TRUE,
),
array(
'type' => 'upload',
'name' => ts('Save and New'),
- 'subName' => 'new'
+ 'subName' => 'new',
),
array(
'type' => 'cancel',
- 'name' => ts('Cancel')
- )
+ 'name' => ts('Cancel'),
+ ),
)
);
}
if ($buildPriceSet) {
$this->add('select', 'price_set_id', ts('Choose price set'),
array(
- '' => ts('Choose price set')
+ '' => ts('Choose price set'),
) + $priceSets,
NULL, array('onchange' => "buildAmount( this.value );")
);
'id',
'auto_renew',
'duration_unit',
- 'duration_interval'
+ 'duration_interval',
) as $fld) {
$this->_recurMembershipTypes[$recurMembershipTypes->id][$fld] = $recurMembershipTypes->$fld;
}
foreach ($statusNames as $val => $name) {
if (in_array($name, array(
'In Progress',
- 'Overdue'
+ 'Overdue',
))
) {
continue;
foreach ($membershipTypes as $memType => $membershipType) {
$statusMsg[$memType] = ts('%1 membership for %2 has been added.', array(
1 => $membershipType,
- 2 => $this->_memberDisplayName
+ 2 => $this->_memberDisplayName,
));
$membership = $createdMemberships[$memType];
'PDFFilename' => ts('receipt') . '.pdf',
'isEmailPdf' => $isEmailPdf,
'contributionId' => $formValues['contribution_id'],
- 'isTest' => (bool) ($form->_action & CRM_Core_Action::PREVIEW)
+ 'isTest' => (bool) ($form->_action & CRM_Core_Action::PREVIEW),
)
);
array(
'type' => 'upload',
'name' => ts('Renew'),
- 'isDefault' => TRUE
+ 'isDefault' => TRUE,
),
array(
'type' => 'cancel',
- 'name' => ts('Cancel')
- )
+ 'name' => ts('Cancel'),
+ ),
)
);
}
array(
'type' => 'next',
'name' => ts('Delete'),
- 'isDefault' => TRUE
+ 'isDefault' => TRUE,
),
array(
'type' => 'cancel',
- 'name' => ts('Cancel')
- )
+ 'name' => ts('Cancel'),
+ ),
)
);
}
array(
'type' => 'upload',
'name' => ts('Save'),
- 'isDefault' => TRUE
+ 'isDefault' => TRUE,
),
array(
'type' => 'upload',
'name' => ts('Save and New'),
- 'subName' => 'new'
+ 'subName' => 'new',
),
array(
'type' => 'cancel',
- 'name' => ts('Cancel')
- )
+ 'name' => ts('Cancel'),
+ ),
)
);
}
$allMembershipInfo[$key] = array(
'financial_type_id' => CRM_Utils_Array::value('financial_type_id', $values),
'total_amount' => CRM_Utils_Money::format($values['minimum_fee'], NULL, '%a'),
- 'total_amount_numeric' => CRM_Utils_Array::value('minimum_fee', $values)
+ 'total_amount_numeric' => CRM_Utils_Array::value('minimum_fee', $values),
);
if (!empty($values['auto_renew'])) {
'fixed_period_start_day',
'fixed_period_rollover_day',
'month_fixed_period_rollover_day',
- 'max_related'
+ 'max_related',
);
$params = $ids = array();
'start_date',
'end_date',
'is_current_member',
- 'status'
+ 'status',
);
while ($dao->fetch()) {
}
CRM_Core_DAO::commonRetrieveAll('CRM_Core_DAO_UFGroup', 'is_cms_user', $isUserRequired, $profiles, array(
'title',
- 'is_active'
+ 'is_active',
));
if (!empty($profiles)) {
foreach ($profiles as $key => $value) {
CRM_Core_Session::setStatus(ts("%1 status has been updated to %2.", array(
1 => $pcpTitle,
- 2 => $pcpStatus
+ 2 => $pcpStatus,
)), 'Status Updated', 'success');
// send status change mail
'unit_price' => $totalAmount,
'line_total' => $totalAmount,
'financial_type_id' => $financialType,
- 'membership_type_id' => $values['membership_type_id']
+ 'membership_type_id' => $values['membership_type_id'],
);
break;
}
$comps = array(
'Event' => 'civicrm_event',
'Contribution' => 'civicrm_contribution_page',
- 'EventTemplate' => 'civicrm_event_template'
+ 'EventTemplate' => 'civicrm_event_template',
);
$priceSetContexts = array();
foreach ($comps as $name => $table) {
$comps = array(
'Event' => 'civicrm_event',
'Contribution' => 'civicrm_contribution_page',
- 'EventTemplate' => 'civicrm_event_template'
+ 'EventTemplate' => 'civicrm_event_template',
);
$priceSetContexts = array();
foreach ($comps as $name => $table) {
$sql = "DELETE FROM {$tableName} WHERE id = %1 AND entity_id = %2";
$sqlParams = array(
1 => array($this->_recordId, 'Integer'),
- 2 => array($this->_id, 'Integer')
+ 2 => array($this->_id, 'Integer'),
);
CRM_Core_DAO::executeQuery($sql, $sqlParams);
CRM_Core_Session::setStatus(ts('Your record has been deleted.'), ts('Deleted'), 'success');
'name' => ts('Copy'),
'title' => ts('Copy %1', array(1 => $this->_customGroupTitle . ' record')),
'url' => 'civicrm/contact/view/cd/edit',
- 'qs' => 'reset=1&type=%%type%%&groupID=%%groupID%%&entityID=%%entityID%%&cgcount=%%newCgCount%%&multiRecordDisplay=single©ValueId=%%cgcount%%&mode=copy'
+ 'qs' => 'reset=1&type=%%type%%&groupID=%%groupID%%&entityID=%%entityID%%&cgcount=%%newCgCount%%&multiRecordDisplay=single©ValueId=%%cgcount%%&mode=copy',
);
}
array(
'title' => ts('Report Templates'),
'url' => CRM_Utils_System::url('civicrm/admin/report/template/list', 'reset=1'),
- )
+ ),
);
CRM_Utils_System::appendBreadCrumb($breadCrumbs);
array(
'' => ts('Any'),
'0' => ts('No'),
- '1' => ts('Yes')
+ '1' => ts('Yes'),
);
}
break;
$this->addChainSelect($fieldName . '_value', array(
'multiple' => TRUE,
'label' => NULL,
- 'class' => 'huge'
+ 'class' => 'huge',
));
}
else {
if (!empty($options)) {
$options = array(
- '-' => ' - none - '
+ '-' => ' - none - ',
) + $options;
for ($i = 1; $i <= 5; $i++) {
$this->addElement('select', "order_bys[{$i}][column]", ts('Order by Column'), $options);
$this->addElement('select', "order_bys[{$i}][order]", ts('Order by Order'), array(
'ASC' => 'Ascending',
- 'DESC' => 'Descending'
+ 'DESC' => 'Descending',
));
$this->addElement('checkbox', "order_bys[{$i}][section]", ts('Order by Section'), FALSE, array('id' => "order_by_section_$i"));
$this->addElement('checkbox', "order_bys[{$i}][pageBreak]", ts('Page Break'), FALSE, array('id' => "order_by_pagebreak_$i"));
//add form rule for report
if (is_callable(array(
$this,
- 'formRule'
+ 'formRule',
))) {
$this->addFormRule(array(get_class($this), 'formRule'), $this);
}
'data_type',
'html_type',
'option_group_id',
- 'id'
+ 'id',
);
// skip for type date and ContactReference since date format is already handled
case 'Int':
if (in_array($htmlType, array(
'Text',
- 'TextArea'
+ 'TextArea',
))) {
$retValue = $value;
break;
foreach (array(
'fields',
'filters',
- 'group_bys'
+ 'group_bys',
) as $colKey) {
if (!array_key_exists($colKey, $this->_columns[$curTable])) {
$this->_columns[$curTable][$colKey] = array();
if (in_array($customDAO->html_type, array(
'Multi-Select',
'AdvMulti-Select',
- 'CheckBox'
+ 'CheckBox',
))) {
$curFilters[$fieldName]['operatorType'] = CRM_Report_Form::OP_MULTISELECT_SEPARATOR;
}
$ogDAO = CRM_Core_DAO::executeQuery("SELECT ov.value, ov.label FROM civicrm_option_value ov WHERE ov.option_group_id = %1 ORDER BY ov.weight", array(
1 => array(
$customDAO->option_group_id,
- 'Integer'
- )
+ 'Integer',
+ ),
));
while ($ogDAO->fetch()) {
$curFilters[$fieldName]['options'][$ogDAO->value] = $ogDAO->label;
case 'StateProvince':
if (in_array($customDAO->html_type, array(
- 'Multi-Select State/Province'
+ 'Multi-Select State/Province',
))) {
$curFilters[$fieldName]['operatorType'] = CRM_Report_Form::OP_MULTISELECT_SEPARATOR;
}
case 'Country':
if (in_array($customDAO->html_type, array(
- 'Multi-Select Country'
+ 'Multi-Select Country',
))) {
$curFilters[$fieldName]['operatorType'] = CRM_Report_Form::OP_MULTISELECT_SEPARATOR;
}
'max',
'relative',
'from',
- 'to'
+ 'to',
) as $attach) {
if (isset($this->_params[$fieldAlias . '_' . $attach]) &&
(!empty($this->_params[$fieldAlias . '_' . $attach])
'fields' => array(
$options['prefix'] . 'phone' => array(
'title' => ts($options['prefix_label'] . 'Phone'),
- 'name' => 'phone'
+ 'name' => 'phone',
),
),
),
protected $_selectAliasesTotal = array();
protected $_customGroupExtends = array(
- 'Activity'
+ 'Activity',
);
protected $_nonDisplayFields = array();
),
'details' => array(
'title' => ts('Activity Details'),
- )
+ ),
),
'filters' => array(
'activity_date_time' => array(
'details' => array(
'title' => ts('Activity Details'),
'type' => CRM_Utils_Type::T_TEXT,
- )
+ ),
),
'order_bys' => array(
'activity_date_time' => array(
'title' => ts('Activity Date'),
'default_weight' => '1',
- 'dbAlias' => 'civicrm_activity_activity_date_time'
+ 'dbAlias' => 'civicrm_activity_activity_date_time',
),
'activity_type_id' => array(
'title' => ts('Activity Type'),
'default_weight' => '2',
- 'dbAlias' => "option_value_civireport"
+ 'dbAlias' => "option_value_civireport",
),
),
'grouping' => 'activity-fields',
),
'order_bys' => array(
'sort_name' => array(
- 'title' => ts('Contact Name')
+ 'title' => ts('Contact Name'),
),
),
'grouping' => 'contact-fields',
),
'order_bys' => array(
'email' => array(
- 'title' => ts('Email')
+ 'title' => ts('Email'),
),
),
'grouping' => 'contact-fields',
'dao' => 'CRM_Core_DAO_Email',
'fields' => array(
'phone' => array(
- 'title' => 'Phone'
+ 'title' => 'Phone',
),
),
'grouping' => 'contact-fields',
),
'filters' => array(
'activity_date_time' => array(
- 'operatorType' => CRM_Report_Form::OP_DATE
+ 'operatorType' => CRM_Report_Form::OP_DATE,
),
'activity_type_id' => array(
'title' => ts('Activity Type'),
),
'order_bys' => array(
'activity_date_time' => array(
- 'title' => ts('Activity Date')
+ 'title' => ts('Activity Date'),
),
'activity_type_id' => array(
- 'title' => ts('Activity Type')
+ 'title' => ts('Activity Type'),
),
),
'grouping' => 'activity-fields',
'Individual',
'Household',
'Organization',
- 'Activity'
+ 'Activity',
);
public $_drilldownReport = array('contact/detail' => 'Link to Detail Report');
'type' => CRM_Utils_Type::T_INT,
'operatorType' => CRM_Report_Form::OP_SELECT,
'options' => array(
- '' => ts('- any interviewer -')
+ '' => ts('- any interviewer -'),
) + $allSurveyInterviewers,
- )
+ ),
),
'grouping' => 'survey-interviewer-fields',
),
'sort_name' => array(
'title' => ts('Respondent Name'),
'operator' => 'like',
- )
+ ),
),
'grouping' => 'contact-fields',
'order_bys' => array(
'sort_name' => array(
'title' => ts('Respondent Name'),
'required' => TRUE,
- )
+ ),
),
),
'civicrm_phone' => array(
'phone' => array(
'name' => 'phone',
'title' => ts('Phone'),
- )
+ ),
),
'grouping' => 'location-fields',
),
'email' => array(
'name' => 'email',
'title' => ts('Email'),
- )
+ ),
),
'grouping' => 'location-fields',
),
$orderBys = CRM_Utils_Array::value('order_bys', $this->_params, array());
if (in_array($this->_outputMode, array(
'print',
- 'pdf'
+ 'pdf',
))) {
$outPut = array();
$value = $responseField->label;
if (in_array($this->_outputMode, array(
'print',
- 'pdf'
+ 'pdf',
))) {
$value = $responseField->value;
}
$title = $responseFields[$fieldName]['title'];
if (in_array($this->_outputMode, array(
'print',
- 'pdf'
+ 'pdf',
))) {
$title = 'Q' . $fildCnt++;
}
'options' => array(
1 => ts('Exclude non-case'),
2 => ts('Exclude cases'),
- 3 => ts('Include Both')
+ 3 => ts('Include Both'),
),
'default' => 3,
),
$this->deleted_labels = array(
'' => ts('- select -'),
0 => ts('No'),
- 1 => ts('Yes')
+ 1 => ts('Yes'),
);
$this->caseActivityTypes = array();
$elements = array();
$elements[] = &$this->createElement('select', 'case_activity_all_dates', NULL,
array(
- '' => ts('- select -')
+ '' => ts('- select -'),
) + $this->caseActivityTypes
);
$this->addGroup($elements, 'case_detail_extra');
$this->deleted_labels = array(
'' => ts('- select -'),
0 => ts('No'),
- 1 => ts('Yes')
+ 1 => ts('Yes'),
);
$this->_columns = array(
'options' => array(
1 => ts('Exclude non-case'),
2 => ts('Exclude cases'),
- 3 => ts('Include Both')
+ 3 => ts('Include Both'),
),
'default' => 3,
),
protected $_customGroupExtends = array(
'Contact',
- 'Individual'
+ 'Individual',
);
public $_drilldownReport = array('contact/detail' => 'Link to Detail Report');
// get the acl clauses built before we assemble the query
$this->buildACLClause(array(
$this->_aliases['civicrm_contact'],
- $this->_aliases['civicrm_employer']
+ $this->_aliases['civicrm_employer'],
));
parent::postProcess();
}
'Contact',
'Individual',
'Household',
- 'Organization'
+ 'Organization',
);
/**
'title' => ts('Last Name, First Name'),
'default' => '1',
'default_weight' => '0',
- 'default_order' => 'ASC'
+ 'default_order' => 'ASC',
),
),
),
'fields' => array(
'phone' => NULL,
'phone_ext' => array(
- 'title' => ts('Phone Extension')
- )
+ 'title' => ts('Phone Extension'),
+ ),
),
'grouping' => 'contact-fields',
),
'membership_civireport',
'participant_civireport',
'relationship_civireport',
- 'activity_civireport'
+ 'activity_civireport',
);
foreach ($this->_columns as $tableName => $table) {
if (array_key_exists('fields', $table)) {
protected $_phoneField_a = FALSE;
protected $_phoneField_b = FALSE;
protected $_customGroupExtends = array(
- 'Relationship'
+ 'Relationship',
);
public $_drilldownReport = array('contact/detail' => 'Link to Detail Report');
'fields' => array(
'phone_b' => array(
'title' => ts('Phone (Contact B)'),
- 'name' => 'phone'
+ 'name' => 'phone',
),
'phone_ext_b' => array(
'title' => ts('Phone Ext (Contact B)'),
- 'name' => 'phone_ext'
+ 'name' => 'phone_ext',
),
),
'grouping' => 'conact_b_fields',
'title' => ts('Relationship'),
'operatorType' => CRM_Report_Form::OP_SELECT,
'options' => array(
- '' => '- any relationship type -'
+ '' => '- any relationship type -',
) +
CRM_Contact_BAO_Relationship::getContactRelationshipType(NULL, 'null', NULL, NULL, TRUE),
'type' => CRM_Utils_Type::T_INT,
$this->buildACLClause(array(
$this->_aliases['civicrm_contact'],
- $this->_aliases['civicrm_contact_b']
+ $this->_aliases['civicrm_contact_b'],
));
$sql = $this->buildQuery();
$this->buildRows($sql, $rows);
'Contact',
'Individual',
'Household',
- 'Organization'
+ 'Organization',
);
public $_drilldownReport = array('contact/detail' => 'Link to Detail Report');
'fields' => array(
'phone' => NULL,
'phone_ext' => array(
- 'title' => ts('Phone Extension')
- )
+ 'title' => ts('Phone Extension'),
+ ),
),
'grouping' => 'contact-fields',
),
protected $_summary = NULL;
protected $_customGroupExtends = array(
- 'Membership'
+ 'Membership',
);
/**
'dao' => 'CRM_Contribute_DAO_Contribution',
'fields' => array(
'receive_date' => array(
- 'default' => TRUE
+ 'default' => TRUE,
),
'invoice_id' => array(
'title' => ts('Invoice ID'),
'title' => ts('Last Name, First Name'),
'default' => '1',
'default_weight' => '0',
- 'default_order' => 'ASC'
+ 'default_order' => 'ASC',
),
),
'grouping' => 'contact-fields',
'net_amount' => NULL,
'contribution_or_soft' => array(
'title' => ts('Contribution OR Soft Credit?'),
- 'dbAlias' => "'Contribution'"
+ 'dbAlias' => "'Contribution'",
),
'soft_credits' => array(
'title' => ts('Soft Credits'),
- 'dbAlias' => "NULL"
+ 'dbAlias' => "NULL",
),
'soft_credit_for' => array(
'title' => ts('Soft Credit For'),
- 'dbAlias' => "NULL"
+ 'dbAlias' => "NULL",
),
),
'filters' => array(
foreach ($totals as $key => $total) {
$totalandsum[$key] = ts($title, array(
1 => $total,
- 2 => CRM_Utils_Money::format($sumcontribs[$key])
+ 2 => CRM_Utils_Money::format($sumcontribs[$key]),
));
}
$this->assign('sectionTotals', $totalandsum);
if ($fieldName == 'this_year' || $fieldName == 'other_year') {
return array(
'calendar' => ts('Is Calendar Year'),
- 'fiscal' => ts('Fiscal Year Starting')
+ 'fiscal' => ts('Fiscal Year Starting'),
);
}
return parent::getOperationPair($type, $fieldName);
'civicrm_email' => array(
'dao' => 'CRM_Core_DAO_Email',
'fields' => array(
- 'email' => NULL
+ 'email' => NULL,
),
'grouping' => 'contact-fields',
),
$this->beginPostProcess();
$this->buildACLClause(array(
$this->_aliases['civicrm_contact'],
- $this->_aliases['civicrm_contact_household']
+ $this->_aliases['civicrm_contact_household'],
));
$sql = $this->buildQuery(TRUE);
$rows = array();
if ($fieldName == 'yid') {
return array(
'calendar' => ts('Is Calendar Year'),
- 'fiscal' => ts('Fiscal Year Starting')
+ 'fiscal' => ts('Fiscal Year Starting'),
);
}
return parent::getOperationPair($type, $fieldName);
$statistics['counts']['goal_total'] = array(
'title' => ts('Goal Total'),
'value' => $dao->goal_total,
- 'type' => CRM_Utils_Type::T_MONEY
+ 'type' => CRM_Utils_Type::T_MONEY,
);
$statistics['counts']['committed_total'] = array(
'title' => ts('Total Committed'),
'value' => $dao->committed_total,
- 'type' => CRM_Utils_Type::T_MONEY
+ 'type' => CRM_Utils_Type::T_MONEY,
);
$statistics['counts']['received_total'] = array(
'title' => ts('Total Received'),
'value' => $dao->received_total,
- 'type' => CRM_Utils_Type::T_MONEY
+ 'type' => CRM_Utils_Type::T_MONEY,
);
$statistics['counts']['donors_total'] = array(
'title' => ts('Total Donors'),
'value' => $dao->donors_total,
- 'type' => CRM_Utils_Type::T_INT
+ 'type' => CRM_Utils_Type::T_INT,
);
return $statistics;
}
'total_amount' => array(
'title' => ts('Amount Contributed to Date'),
'statistics' => array(
- 'sum' => ts("Total Amount Contributed")
+ 'sum' => ts("Total Amount Contributed"),
),
),
),
'title' => ts('Calculated end date (either end date or date all installments will be made)'),
'description' => "does this work?",
'operatorType' => CRM_Report_Form::OP_DATE,
- 'pseudofield' => TRUE
+ 'pseudofield' => TRUE,
),
),
- )
+ ),
);
$this->_currencyColumn = 'civicrm_contribution_recur_currency';
parent::__construct();
$erorrGrps = implode(',', $invlidGroups);
$tempErrors[] = ts("Do not select field %1 with Group by %2.", array(
1 => $idMapping[$fld_id],
- 2 => $erorrGrps
+ 2 => $erorrGrps,
));
}
}
$contact_sums[$dao->contact_id] =
array(
'contribution1_total_amount_sum' => $dao->contribution1_total_amount_sum,
- 'contribution2_total_amount_sum' => $dao->contribution2_total_amount_sum
+ 'contribution2_total_amount_sum' => $dao->contribution2_total_amount_sum,
);
}
'filters' => array(
'sort_name' => array(
'name' => 'sort_name',
- 'title' => ts('Soft Credit Name')
+ 'title' => ts('Soft Credit Name'),
),
),
'grouping' => 'contact-fields',
'name' => 'id',
'title' => ts('Financial Type'),
'operatorType' => CRM_Report_Form::OP_MULTISELECT,
- 'options' => CRM_Contribute_PseudoConstant::financialType()
+ 'options' => CRM_Contribute_PseudoConstant::financialType(),
),
),
'grouping' => 'softcredit-fields',
foreach (array(
'total_count_value',
'total_sum_value',
- 'total_avg_value'
+ 'total_avg_value',
) as $val) {
if (!empty($fields[$val])) {
$errors[$val] = ts("Please select the Amount Statistics");
if ($fieldName == 'yid') {
return array(
'calendar' => ts('Is Calendar Year'),
- 'fiscal' => ts('Fiscal Year Starting')
+ 'fiscal' => ts('Fiscal Year Starting'),
);
}
return parent::getOperationPair($type, $fieldName);
if (!in_array($op, array(
'eq',
- 'lte'
+ 'lte',
))
) {
$errors['total_range_op'] = ts("Please select 'Is equal to' OR 'Is Less than or equal to' operator");
protected $_add2groupSupported = FALSE;
protected $_customGroupExtends = array(
- 'Event'
+ 'Event',
);
public $_drilldownReport = array('event/participantlist' => 'Link to Detail Report');
'title' => ts('Event Type'),
),
'fee_label' => array(
- 'title' => ts('Fee Label')
+ 'title' => ts('Fee Label'),
),
'event_start_date' => array(
'title' => ts('Event Start Date'),
'type' => CRM_Utils_Type::T_INT,
'attributes' => array(
'entity' => 'event',
- 'select' => array('minimumInputLength' => 0)
+ 'select' => array('minimumInputLength' => 0),
),
),
'sid' => array(
'Participant',
'Contact',
'Individual',
- 'Event'
+ 'Event',
);
public $_drilldownReport = array('event/income' => 'Link to Detail Report');
'birth_date' => array(
'title' => 'Birth Date',
'operatorType' => CRM_Report_Form::OP_DATE,
- 'type' => CRM_Utils_Type::T_DATE
+ 'type' => CRM_Utils_Type::T_DATE,
),
),
),
'type' => CRM_Utils_Type::T_INT,
'attributes' => array(
'entity' => 'event',
- 'select' => array('minimumInputLength' => 0)
+ 'select' => array('minimumInputLength' => 0),
),
),
'sid' => array(
'event_id' => array(
'title' => ts('Event'),
'default_weight' => '1',
- 'default_order' => 'ASC'
+ 'default_order' => 'ASC',
),
),
),
'event_type_id' => array(
'title' => ts('Event Type'),
'default_weight' => '2',
- 'default_order' => 'ASC'
+ 'default_order' => 'ASC',
),
),
),
),
'currency' => array(
'required' => TRUE,
- 'no_display' => TRUE
+ 'no_display' => TRUE,
),
'trxn_id' => NULL,
'fee_amount' => array('title' => ts('Transaction Fee')),
- 'net_amount' => NULL
+ 'net_amount' => NULL,
),
'grouping' => 'contrib-fields',
'filters' => array(
'title' => ts('Contribution Status'),
'operatorType' => CRM_Report_Form::OP_MULTISELECT,
'options' => CRM_Contribute_PseudoConstant::contributionStatus(),
- 'default' => NULL
+ 'default' => NULL,
),
),
),
protected $_add2groupSupported = FALSE;
protected $_customGroupExtends = array(
- 'Event'
+ 'Event',
);
public $_drilldownReport = array('event/income' => 'Link to Detail Report');
'event_id' => array(
'title' => ts('Event'),
'default_weight' => '1',
- 'default_order' => 'ASC'
+ 'default_order' => 'ASC',
),
),
'group_bys' => array(
'fields' => array(
'id' => array(
'title' => ts('Case ID'),
- 'required' => FALSE
+ 'required' => FALSE,
),
'subject' => array(
'title' => ts('Case Subject'),
- 'default' => TRUE
+ 'default' => TRUE,
),
'status_id' => array(
'title' => ts('Status'),
- 'default' => TRUE
+ 'default' => TRUE,
),
'case_type_id' => array(
'title' => ts('Case Type'),
- 'default' => TRUE
+ 'default' => TRUE,
),
'case_start_date' => array(
'title' => ts('Case Start Date'),
'name' => 'start_date',
- 'default' => TRUE
+ 'default' => TRUE,
),
'case_end_date' => array(
'title' => ts('Case End Date'),
'name' => 'end_date',
- 'default' => TRUE
+ 'default' => TRUE,
),
'case_duration' => array(
'name' => 'duration',
'title' => ts('Duration (Days)'),
- 'default' => FALSE
+ 'default' => FALSE,
),
'case_is_deleted' => array(
'name' => 'is_deleted',
'title' => ts('Case Deleted?'),
'default' => FALSE,
- 'type' => CRM_Utils_Type::T_INT
- )
+ 'type' => CRM_Utils_Type::T_INT,
+ ),
),
'filters' => array(
'case_start_date' => array(
'title' => ts('Case End Date'),
'operatorType' => CRM_Report_Form::OP_DATE,
'type' => CRM_Utils_Type::T_DATE,
- 'name' => 'end_date'
+ 'name' => 'end_date',
),
'case_type_id' => array(
'title' => ts('Case Type'),
'operatorType' => CRM_Report_Form::OP_MULTISELECT,
- 'options' => $this->case_types
+ 'options' => $this->case_types,
),
'case_status_id' => array(
'title' => ts('Case Status'),
'operatorType' => CRM_Report_Form::OP_MULTISELECT,
'options' => $this->case_statuses,
- 'name' => 'status_id'
+ 'name' => 'status_id',
),
'case_is_deleted' => array(
'title' => ts('Case Deleted?'),
'operatorType' => CRM_Report_Form::OP_SELECT,
'options' => $this->deleted_labels,
'default' => 0,
- 'name' => 'is_deleted'
- )
- )
- )
+ 'name' => 'is_deleted',
+ ),
+ ),
+ ),
);
}
'order_by' => TRUE,
'filters' => TRUE,
'defaults' => array(
- 'country_id' => TRUE
+ 'country_id' => TRUE,
),
);
protected $_addressField = FALSE;
protected $_customGroupExtends = array(
- 'Grant'
+ 'Grant',
);
/**
foreach ($this->_columns as $tableName => $table) {
if (in_array($tableName, array(
'civicrm_address',
- 'civicrm_world_region'
+ 'civicrm_world_region',
))) {
$this->_addressField = TRUE;
}
ts('Limit Dashboard Results'),
array(
'maxlength' => 64,
- 'size' => 5
+ 'size' => 5,
)
);
'Contact',
'Individual',
'Household',
- 'Organization'
+ 'Organization',
);
protected $_charts = array(
'sort_name' => array(
'title' => ts('Contact Name'),
'default' => TRUE,
- 'default_order' => 'ASC'
+ 'default_order' => 'ASC',
),
),
'grouping' => 'contact-fields',
'Contact',
'Individual',
'Household',
- 'Organization'
+ 'Organization',
);
protected $_charts = array(
'sort_name' => array(
'title' => ts('Contact Name'),
'default' => TRUE,
- 'default_order' => 'ASC'
+ 'default_order' => 'ASC',
),
),
'grouping' => 'contact-fields',
'options' => array(
'' => ts('Any'),
'0' => ts('No'),
- '1' => ts('Yes')
+ '1' => ts('Yes'),
),
'clause' => 'mailing_event_unsubscribe_civireport.id IS NULL',
),
'options' => array(
'' => ts('Any'),
'0' => ts('No'),
- '1' => ts('Yes')
+ '1' => ts('Yes'),
),
'clause' => 'mailing_event_unsubscribe_civireport2.id IS NULL',
),
'options' => array(
'' => ts('Any'),
'0' => ts('No'),
- '1' => ts('Yes')
+ '1' => ts('Yes'),
),
'clause' => 'mailing_event_reply_civireport.id IS NULL',
),
'options' => array(
'' => ts('Any'),
'0' => ts('No'),
- '1' => ts('Yes')
+ '1' => ts('Yes'),
),
'clause' => 'mailing_event_forward_civireport.id IS NULL',
),
'unsubscribe_id',
'optout_id',
'forward_id',
- 'reply_id'
+ 'reply_id',
))) {
$select[] = "IF({$field['dbAlias']} IS NULL, 'No', 'Yes') as {$tableName}_{$fieldName}";
$this->_columnHeaders["{$tableName}_{$fieldName}"]['type'] = CRM_Utils_Array::value('type', $field);
'Contact',
'Individual',
'Household',
- 'Organization'
+ 'Organization',
);
protected $_charts = array(
'sort_name' => array(
'title' => ts('Contact Name'),
'default' => TRUE,
- 'default_order' => 'ASC'
+ 'default_order' => 'ASC',
),
),
'grouping' => 'contact-fields',
protected $_customGroupExtends = array(
'Contribution',
- 'Membership'
+ 'Membership',
);
/**
'title' => ts('Last Name, First Name'),
'default' => '1',
'default_weight' => '0',
- 'default_order' => 'ASC'
+ 'default_order' => 'ASC',
),
),
'grouping' => 'contact-fields',
protected $_phoneField = FALSE;
protected $_charts = array('' => 'Tabular');
protected $_customGroupExtends = array(
- 'Membership'
+ 'Membership',
);
public $_drilldownReport = array('member/detail' => 'Link to Detail Report');
foreach (array(
'receive_date',
$this->_interval,
- 'value'
+ 'value',
) as $ignore) {
unset($graphRows[$ignore][$count - 1]);
}
protected $_pledgeStatuses = array();
protected $_customGroupExtends = array(
'Pledge',
- 'Individual'
+ 'Individual',
);
/**
$this->_totalPaid = TRUE; // add pledge_payment join
$this->_columnHeaders["{$tableName}_{$fieldName}"] = array(
'title' => $field['title'],
- 'type' => $field['type']
+ 'type' => $field['type'],
);
return "COALESCE(sum({$this->_aliases[$tableName]}.actual_amount), 0) as {$tableName}_{$fieldName}";
}
$this->_columnHeaders["{$tableName}_{$fieldName}"] = $field['title'];
$this->_columnHeaders["{$tableName}_{$fieldName}"] = array(
'title' => $field['title'],
- 'type' => $field['type']
+ 'type' => $field['type'],
);
return "IF({$this->_aliases['civicrm_pledge']}.status_id IN({$cancelledStatus}, $completedStatus), 0, COALESCE({$this->_aliases['civicrm_pledge']}.amount, 0) - COALESCE(sum({$this->_aliases[$tableName]}.actual_amount),0)) as {$tableName}_{$fieldName}";
}
*/
$tableHeaders = array(
'civicrm_pledge_payment_total_paid',
- 'civicrm_pledge_payment_balance_due'
+ 'civicrm_pledge_payment_balance_due',
);
foreach ($tableHeaders as $header) {
public $_drilldownReport = array('pledge/summary' => 'Link to Detail Report');
protected $_customGroupExtends = array(
- 'Pledge'
+ 'Pledge',
);
/**
foreach (array(
'Pending',
'In Progress',
- 'Overdue'
+ 'Overdue',
) as $statusKey) {
if ($key = CRM_Utils_Array::key($statusKey, $allStatus)) {
$unpaidStatus[] = $key;
'Contact',
'Individual',
'Household',
- 'Organization'
+ 'Organization',
);
/**
'sort_name' => array(
'title' => ts('Contact Name'),
'required' => TRUE,
- )
+ ),
),
),
'civicrm_address' => array(
'default' => 'null',
),
),
- 'ignoreKey' => TRUE
+ 'ignoreKey' => TRUE,
);
$messages[] = $wrapper->run($templateInfo['name'], NULL, $arguments);
}
'email' => array(
1 => array(
'location_type_id' => $phoneloc,
- 'email' => $stripFrom . '@mobile.sms'
+ 'email' => $stripFrom . '@mobile.sms',
)),
'phone' => array(
1 => array(
'phone_type_id' => $phonetype,
'location_type_id' => $phoneloc,
- 'phone' => $stripFrom
+ 'phone' => $stripFrom,
)),
);
$fromContact = CRM_Contact_BAO_Contact::create($contactparams, FALSE, TRUE, FALSE);
'activity_date_time' => date('YmdHis'),
'status_id' => $actStatusIDs['Completed'],
'details' => $body,
- 'phone_number' => $from
+ 'phone_number' => $from,
);
if ($trackID) {
$trackID = CRM_Utils_Type::escape($trackID, 'String');
'county',
'phone',
'email',
- 'im'
+ 'im',
);
if ($fieldDAO->location_type_id) {
array(
1 => $minPhpVersion,
2 => $phpVersion,
- 3 => $latestVer
+ 3 => $latestVer,
));
}
if (CRM_Core_DAO::getGlobalSetting('thread_stack', 0) < (1024 * self::MINIMUM_THREAD_STACK)) {
$error = ts('CiviCRM %1 requires MySQL thread stack >= %2k', array(
1 => $latestVer,
- 2 => self::MINIMUM_THREAD_STACK
+ 2 => self::MINIMUM_THREAD_STACK,
));
}
if (file_exists($ofcFile)) {
if (@unlink($ofcFile)) {
$preUpgradeMessage .= '<br />' . ts('This system included an outdated, insecure script (%1). The file was automatically deleted.', array(
- 1 => $ofcFile
+ 1 => $ofcFile,
));
}
else {
$preUpgradeMessage .= '<br />' . ts('This system includes an outdated, insecure script (%1). Please delete it.', array(
- 1 => $ofcFile
+ 1 => $ofcFile,
));
}
}
}
if ($oversizedEntries > 0) {
$preUpgradeMessage .= '<br/>' . ts("WARNING: There are %1 word-replacement entries which will not be valid in v4.4+ (eg with over 255 characters). They will be dropped during upgrade. For details, consult the CiviCRM log.", array(
- 1 => $oversizedEntries
+ 1 => $oversizedEntries,
));
}
}
$queryParams = array(
1 => array($completedStatus, 'Integer'),
2 => array($pendingStatus, 'Integer'),
- 3 => array($cancelledStatus, 'Integer')
+ 3 => array($cancelledStatus, 'Integer'),
);
$accountType = key(CRM_Core_PseudoConstant::accountOptionValues('financial_account_type', NULL, " AND v.name = 'Asset' "));
'display_name' => $dao->name,
'legal_name' => $dao->name,
'organization_name' => $dao->name,
- 'contact_type' => 'Organization'
+ 'contact_type' => 'Organization',
);
$contact = CRM_Contact_BAO_Contact::add($params);
$contactID = $contact->id;
// note: error conditions are also checked in upgrade_4_2_beta2()
if (!defined('CIVICRM_SETTINGS_PATH')) {
$preUpgradeMessage .= '<br />' . ts('Could not determine path to civicrm.settings.php. Please manually locate it and add these lines at the bottom: <pre>%1</pre>', array(
- 1 => self::SETTINGS_SNIPPET
+ 1 => self::SETTINGS_SNIPPET,
));
}
elseif (preg_match(self::SETTINGS_SNIPPET_PATTERN, file_get_contents(CIVICRM_SETTINGS_PATH))) {
elseif (!is_writable(CIVICRM_SETTINGS_PATH)) {
$preUpgradeMessage .= '<br />' . ts('The settings file (%1) must be updated. Please make it writable or manually add these lines:<pre>%2</pre>', array(
1 => CIVICRM_SETTINGS_PATH,
- 2 => self::SETTINGS_SNIPPET
+ 2 => self::SETTINGS_SNIPPET,
));
}
}
$config = CRM_Core_Config::singleton();
if (!empty($config->extensionsDir)) {
$postUpgradeMessage .= '<br />' . ts('Please <a href="%1" target="_blank">configure the Extension Resource URL</a>.', array(
- 1 => CRM_Utils_System::url('civicrm/admin/setting/url', 'reset=1')
+ 1 => CRM_Utils_System::url('civicrm/admin/setting/url', 'reset=1'),
));
}
}
$daoName = array(
'civicrm_contribution_page' => array(
'CRM_Contribute_BAO_ContributionPage',
- CRM_Core_Component::getComponentID('CiviContribute')
+ CRM_Core_Component::getComponentID('CiviContribute'),
),
'civicrm_event' => array(
'CRM_Event_BAO_Event',
- CRM_Core_Component::getComponentID('CiviEvent')
+ CRM_Core_Component::getComponentID('CiviEvent'),
),
);
if (CRM_Utils_System::isUserLoggedIn()) {
$msg = ts('The Yahoo Geocoding system returned a different postal code (%1) than the one you entered (%2). If you want the Yahoo value, please delete the current postal code and save again.', array(
1 => $ret['postal'],
- 2 => $current_pc_suffix ? "$current_pc-$current_pc_suffix" : $current_pc
+ 2 => $current_pc_suffix ? "$current_pc-$current_pc_suffix" : $current_pc,
));
CRM_Core_Session::setStatus($msg, ts('Postal Code Mismatch'), 'error');
protected function createCurl($remoteFile) {
require_once 'CA/Config/Curl.php';
$caConfig = CA_Config_Curl::probe(array(
- 'verify_peer' => (bool) CRM_Core_BAO_Setting::getItem(CRM_Core_BAO_Setting::SYSTEM_PREFERENCES_NAME, 'verifySSL', NULL, TRUE)
+ 'verify_peer' => (bool) CRM_Core_BAO_Setting::getItem(CRM_Core_BAO_Setting::SYSTEM_PREFERENCES_NAME, 'verifySSL', NULL, TRUE),
));
$ch = curl_init();
'mappedFields' => array(
array('optionGroup', 'option_group_id', 'option_group_name'),
array('customGroup', 'custom_group_id', 'custom_group_name'),
- )
+ ),
),
'optionGroup' => array(
'data' => array(),
'required' => FALSE,
'idNameMap' => array(),
'mappedFields' => array(
- array('profileGroup', 'uf_group_id', 'profile_group_name')
+ array('profileGroup', 'uf_group_id', 'profile_group_name'),
),
),
'profileJoin' => array(
'required' => FALSE,
'idNameMap' => array(),
'mappedFields' => array(
- array('profileGroup', 'uf_group_id', 'profile_group_name')
+ array('profileGroup', 'uf_group_id', 'profile_group_name'),
),
),
'mappingGroup' => array(
'idNameMap' => array(),
'mappedFields' => array(
array('optionValue', 'mapping_type_id', 'mapping_type_name', 'mapping_type'),
- )
+ ),
),
'mappingField' => array(
'data' => array(),
'id' => $dao->acID,
'contact_id' => $dao->contact_id,
'activity_id' => $dao->activity_id,
- 'record_type_id' => $dao->record_type_id
+ 'record_type_id' => $dao->record_type_id,
);
$this->appendValue($dao->acID, 'civicrm_activity_contact', $activityContacts);
array(
1 => $keyName,
2 => $dao->$keyName,
- 3 => $dao->__table
+ 3 => $dao->__table,
)
), '', 'info');
return FALSE;
1 => array(
(string ) $customGroupXML->extends_entity_column_value_option_group,
'String',
- )
+ ),
);
$valueID = (int ) CRM_Core_DAO::singleValueQuery($sql, $params);
if ($valueID) {
array(
1 => $profileField->field_name,
2 => $tableName,
- 3 => $columnName
+ 3 => $columnName,
)
) . "<br />");
}
'CRM_Contribute_DAO_Contribution',
'currency', array(
'keyColumn' => 'name',
- 'labelColumn' => 'symbol'
+ 'labelColumn' => 'symbol',
));
$value = str_replace($currencySymbols, '', $value);
}
$result = array(
- $fileDao->id => _civicrm_api3_attachment_format_result($fileDao, $entityFileDao, $returnContent, $isTrusted)
+ $fileDao->id => _civicrm_api3_attachment_format_result($fileDao, $entityFileDao, $returnContent, $isTrusted),
);
return civicrm_api3_create_success($result, $params, 'Attachment', 'create');
}
'title' => 'Constant Name',
'name' => 'name',
'api.required' => 1,
- 'options' => array_combine($options, $options)
+ 'options' => array_combine($options, $options),
))
);
}
else {
$result = civicrm_api3('contact', 'create', array(
'organization_name' => $params['current_employer'],
- 'contact_type' => 'Organization'
+ 'contact_type' => 'Organization',
));
$params['employer_id'] = $result['id'];
}
$contactList = array(
array(
'data' => $currEmpDetails['data'],
- 'id' => $currEmpDetails['id']
- )
+ 'id' => $currEmpDetails['id'],
+ ),
);
}
else {
$contactList = array(
array(
'data' => $name,
- 'id' => $name
- )
+ 'id' => $name,
+ ),
);
}
}
$params['soft_credit'][] = array(
'contact_id' => $params['soft_credit_to'],
'amount' => $params['total_amount'],
- 'soft_credit_type_id' => CRM_Core_OptionGroup::getDefaultValue("soft_credit_type")
+ 'soft_credit_type_id' => CRM_Core_OptionGroup::getDefaultValue("soft_credit_type"),
);
}
if (!empty($params['honor_contact_id'])) {
$params['soft_credit'][] = array(
'contact_id' => $params['honor_contact_id'],
'amount' => $params['total_amount'],
- 'soft_credit_type_id' => CRM_Utils_Array::value('honor_type_id', $params, CRM_Core_OptionGroup::getValue('soft_credit_type', 'in_honor_of', 'name'))
+ 'soft_credit_type_id' => CRM_Utils_Array::value('honor_type_id', $params, CRM_Core_OptionGroup::getValue('soft_credit_type', 'in_honor_of', 'name')),
);
}
}
function _civicrm_api3_contribution_sendconfirmation_spec(&$params) {
$params['id'] = array(
'api.required' => 1,
- 'title' => 'Contribution ID'
+ 'title' => 'Contribution ID',
);
$params['receipt_from_email'] = array(
'api.required' => 1,
if (!empty($domain['contact_id'])) {
$values = array();
$locparams = array(
- 'contact_id' => $domain['contact_id']
+ 'contact_id' => $domain['contact_id'],
);
$values['location'] = CRM_Core_BAO_Location::getValues($locparams, TRUE);
'phone' => CRM_Utils_Array::value(
'phone',
$values['location']['phone'][1]
- )
+ ),
);
}
$extraReturnValues= array(
'total_count' => 0,
'added' => 0,
- 'not_added' => 0
+ 'not_added' => 0,
);
foreach ($groupIDs as $groupID) {
list($tc, $a, $na) = CRM_Contact_BAO_GroupContact::addContactsToGroup($contactIDs,
$extraReturnValues= array(
'total_count' => 0,
'removed' => 0,
- 'not_removed' => 0
+ 'not_removed' => 0,
);
foreach ($groupIDs as $groupID) {
list($tc, $r, $nr) = CRM_Contact_BAO_GroupContact::removeContactsFromGroup($contactIDs, $groupID, $method, $status, $tracking);
// as it is calling the api fn to set the filters - update getfields to reflect
$params['id'] = array(
'type' => CRM_Utils_Type::T_INT,
- 'title' => 'Action Schedule ID'
+ 'title' => 'Action Schedule ID',
);
}
/**
$contact = civicrm_api3('Contact', 'create',
array('contact_type' => 'Individual',
'email' => $email,
- 'api.Email.get' => array('return' => 'id')
+ 'api.Email.get' => array('return' => 'id'),
)
);
$contactId = $contact['id'];
civicrm_api3('MailingEventQueue', 'create',
array('job_id' => $job['id'],
'email_id' => $emailId,
- 'contact_id' => $contactId
+ 'contact_id' => $contactId,
)
);
}
switch ($detail) {
case 'Delivered':
$stats[$params['mailing_id']] += array(
- $detail => CRM_Mailing_Event_BAO_Delivered::getTotalCount($params['mailing_id'], $params['job_id'], FALSE, $params['date'])
+ $detail => CRM_Mailing_Event_BAO_Delivered::getTotalCount($params['mailing_id'], $params['job_id'], FALSE, $params['date']),
);
break;
case 'Bounces':
$stats[$params['mailing_id']] += array(
- $detail => CRM_Mailing_Event_BAO_Bounce::getTotalCount($params['mailing_id'], $params['job_id'], FALSE, $params['date'])
+ $detail => CRM_Mailing_Event_BAO_Bounce::getTotalCount($params['mailing_id'], $params['job_id'], FALSE, $params['date']),
);
break;
case 'Unsubscribers':
$stats[$params['mailing_id']] += array(
- $detail => CRM_Mailing_Event_BAO_Unsubscribe::getTotalCount($params['mailing_id'], $params['job_id'], FALSE, NULL, $params['date'])
+ $detail => CRM_Mailing_Event_BAO_Unsubscribe::getTotalCount($params['mailing_id'], $params['job_id'], FALSE, NULL, $params['date']),
);
break;
case 'Unique Clicks':
$stats[$params['mailing_id']] += array(
- $detail => CRM_Mailing_Event_BAO_TrackableURLOpen::getTotalCount($params['mailing_id'], $params['job_id'], FALSE, NULL, $params['date'])
+ $detail => CRM_Mailing_Event_BAO_TrackableURLOpen::getTotalCount($params['mailing_id'], $params['job_id'], FALSE, NULL, $params['date']),
);
break;
case 'Opened':
$stats[$params['mailing_id']] += array(
- $detail => CRM_Mailing_Event_BAO_Opened::getTotalCount($params['mailing_id'], $params['job_id'], FALSE, $params['date'])
+ $detail => CRM_Mailing_Event_BAO_Opened::getTotalCount($params['mailing_id'], $params['job_id'], FALSE, $params['date']),
);
break;
}
$graphStats[$name] = array(
$params['split_count_select'] => array(
'count' => CRM_Mailing_Event_BAO_Opened::getTotalCount($mailingAB[$column], NULL, TRUE, $toDate),
- 'time' => CRM_Utils_Date::customFormat($toDate)
- )
+ 'time' => CRM_Utils_Date::customFormat($toDate),
+ ),
);
break;
case 'total unique clicks':
$graphStats[$name] = array(
$params['split_count_select'] => array(
'count' => CRM_Mailing_Event_BAO_TrackableURLOpen::getTotalCount($params['mailing_id'], NULL, FALSE, NULL, $toDate),
- 'time' => CRM_Utils_Date::customFormat($toDate)
- )
+ 'time' => CRM_Utils_Date::customFormat($toDate),
+ ),
);
break;
case 'total clicks on a particular link':
$graphStats[$name] = array(
$params['split_count_select'] => array(
'count' => CRM_Mailing_Event_BAO_TrackableURLOpen::getTotalCount($params['mailing_id'], NULL, FALSE, $url_id, $toDate),
- 'time' => CRM_Utils_Date::customFormat($toDate)
- )
+ 'time' => CRM_Utils_Date::customFormat($toDate),
+ ),
);
break;
}
'options' => array(
'Delivered' => 'Delivered',
'Bounced' => 'Bounced',
- )
+ ),
);
}
";
$qParams = array(
- 1 => array($contactID, 'Integer')
+ 1 => array($contactID, 'Integer'),
);
$dao = CRM_Core_DAO::executeQuery($sql, $qParams);
$params = array(
'type' => $type,
- 'contact_id' => $contactID
+ 'contact_id' => $contactID,
);
$results = $dao->N;
$qParams = array(
1 => array($contactID, 'Integer'),
2 => array($offset, 'Integer'),
- 3 => array($limit, 'Integer')
+ 3 => array($limit, 'Integer'),
);
$dao = CRM_Core_DAO::executeQuery($sql, $qParams);
$params['membership_type_id']['api.aliases'] = array('membership_type');
$params['status_id']['api.aliases'] = array('membership_status');
$params['skipStatusCal'] = array(
- 'title' => 'Skip status calculation. By default this is 0 if id is not set and 1 if it is set.'
+ 'title' => 'Skip status calculation. By default this is 0 if id is not set and 1 if it is set.',
);
$params['num_terms'] = array(
'title' => 'Number of terms to add/renew. If this parameter is passed, dates will be calculated automatically. If no id is passed (new membership) and no dates are given, num_terms will be assumed to be 1.',
function civicrm_api3_pledge_delete($params) {
if (CRM_Pledge_BAO_Pledge::deletePledge($params['id'])) {
return civicrm_api3_create_success(array(
- 'id' => $params['id']
+ 'id' => $params['id'],
), $params, 'pledge', 'delete');
}
else {
if (isset($contactParams['api.contribution.create']) && isset($contactParams['api.membership.create'])) {
$contactParams['api.membership_payment.create'] = array(
'contribution_id' => '$value.api.contribution.create.id',
- 'membership_id' => '$value.api.membership.create.id'
+ 'membership_id' => '$value.api.membership.create.id',
);
}
if (isset($contactParams['api.contribution.create']) && isset($contactParams['api.participant.create'])) {
$contactParams['api.participant_payment.create'] = array(
'contribution_id' => '$value.api.contribution.create.id',
- 'participant_id' => '$value.api.participant.create.id'
+ 'participant_id' => '$value.api.participant.create.id',
);
}
'api.required' => 0,
'title' => 'Setting Group',
'description' => 'Settings Group. This is required if the setting is not stored in config',
- 'type' => CRM_Utils_Type::T_STRING)
+ 'type' => CRM_Utils_Type::T_STRING),
);
return civicrm_api3_create_success($result, $params, 'setting', 'getfields');
}
foreach ($domains as $domainID) {
$apiArray = array(
'version' => $params['version'],
- 'domain_id' => $domainID
+ 'domain_id' => $domainID,
);
$existing = civicrm_api3('setting', 'get', $apiArray);
$valuesToFill = array_diff_key($defaults['values'][$domainID], $existing['values'][$domainID]);
'api.default' => 'current_domain',
'title' => 'Setting Domain',
'description' => 'Defaults may differ by domain - if you do not pass in a domain id this will default to the current domain
- an array or "all" are acceptable values for multiple domains'
+ an array or "all" are acceptable values for multiple domains',
);
}
'api.default' => 'current_domain',
'title' => 'Setting Domain',
'description' => 'if you do not pass in a domain id this will default to the current domain
- an array or "all" are acceptable values for multiple domains'
+ an array or "all" are acceptable values for multiple domains',
);
$params['group'] = array(
'title' => 'Setting Group',
- 'description' => 'if you know the group defining it will make the api more efficient'
+ 'description' => 'if you know the group defining it will make the api more efficient',
);
}
$params['domain_id'] = array(
'api.default' => 'current_domain',
'title' => 'Setting Domain',
- 'description' => 'if you do not pass in a domain id this will default to the current domain'
+ 'description' => 'if you do not pass in a domain id this will default to the current domain',
);
$params['group'] = array(
'title' => 'Setting Group',
- 'description' => 'if you know the group defining it will make the api more efficient'
+ 'description' => 'if you know the group defining it will make the api more efficient',
);
}
/**
);
$params['domain_id'] = array(
'title' => 'Setting Domain',
- 'description' => 'if you do not pass in a domain id this will default to the current domain'
+ 'description' => 'if you do not pass in a domain id this will default to the current domain',
);
}
'is_domain' => 1,
'is_contact' => 1,
'description' => "WRITE ME",
- 'help_text' => 'WRITE ME'
+ 'help_text' => 'WRITE ME',
),
);
array('name' => 'First act'),
array('name' => 'Second act'),
),
- )
+ ),
));
$this->assertTrue(CRM_Case_BAO_CaseType::isForkable($caseTypeId));
array('name' => 'First act'),
array('name' => 'Second act'),
),
- )
+ ),
));
$this->assertFalse(CRM_Case_BAO_CaseType::isForkable($caseTypeId));
2 => 'Cool City',
3 => 1,
4 => 0,
- )
+ ),
);
$returnProperties = array(
'contact_type' => 1,
2 => 'Dumb City',
3 => 1,
4 => 0,
- )
+ ),
);
$returnProperties = array(
'contact_type' => 1,
2 => 'Cool City',
3 => 1,
4 => 0,
- )
+ ),
);
$returnProperties = array(
'contact_type' => 1,
'repetition_frequency_unit' => 'month',
'repetition_frequency_interval' => 3,
'start_action_offset' => 5,
- 'used_for' => 'activity'
+ 'used_for' => 'activity',
);
$generatedEntities = $recursion->generate();
'20141227103000',
'20150328103000',
'20150627103000',
- '20150926103000'
+ '20150926103000',
);
foreach ($generatedEntities['civicrm_activity'] as $entityID) {
$this->assertDBNotNull('CRM_Activity_DAO_Activity', $entityID, 'id',
'repetition_frequency_unit' => 'week',
'repetition_frequency_interval' => 1,
'start_action_offset' => 4,
- 'used_for' => 'event'
+ 'used_for' => 'event',
);
$recursion->linkedEntities = array(
'table' => 'civicrm_tell_friend',
'findCriteria' => array(
'entity_id' => $recursion->entity_id,
- 'entity_table' => 'civicrm_event'
+ 'entity_table' => 'civicrm_event',
),
'linkedColumns' => array('entity_id'),
'isRecurringEntityRecord' => TRUE,
'20141027103000' => '20141029103000',
'20141103103000' => '20141105103000',
'20141110103000' => '20141112103000',
- '20141117103000' => '20141119103000'
+ '20141117103000' => '20141119103000',
);
$this->assertCount($recursion->schedule['start_action_offset'], $generatedEntities['civicrm_event'], 'Check if the number of events created are right');
//Cross check event exists before we test deletion
$searchParamsEventBeforeDelete = array(
'entity_id' => $generatedEntities['civicrm_event'][$key],
- 'entity_table' => 'civicrm_event'
+ 'entity_table' => 'civicrm_event',
);
$expectedValuesEventBeforeDelete = array(
'entity_id' => $generatedEntities['civicrm_event'][$key],
- 'entity_table' => 'civicrm_event'
+ 'entity_table' => 'civicrm_event',
);
$this->assertDBCompareValues('CRM_Core_DAO_RecurringEntity', $searchParamsEventBeforeDelete, $expectedValuesEventBeforeDelete);
//Cross check event exists before we test deletion
$searchParamsTellAFriendBeforeDelete = array(
'entity_id' => $generatedEntities['civicrm_tell_friend'][$actKey],
- 'entity_table' => 'civicrm_tell_friend'
+ 'entity_table' => 'civicrm_tell_friend',
);
$expectedValuesTellAFriendBeforeDelete = array(
'entity_id' => $generatedEntities['civicrm_tell_friend'][$actKey],
- 'entity_table' => 'civicrm_tell_friend'
+ 'entity_table' => 'civicrm_tell_friend',
);
$this->assertDBCompareValues('CRM_Core_DAO_RecurringEntity', $searchParamsTellAFriendBeforeDelete, $expectedValuesTellAFriendBeforeDelete);
$this->assertDBNull('CRM_Event_DAO_Event', $generatedEntities['civicrm_event'][$key], 'id', 'id', 'Check if event was deleted');
$searchParams = array(
'entity_id' => $generatedEntities['civicrm_event'][$key],
- 'entity_table' => 'civicrm_event'
+ 'entity_table' => 'civicrm_event',
);
$compareParams = array();
$this->assertDBCompareValues('CRM_Core_DAO_RecurringEntity', $searchParams, $compareParams);
//Find tell_a_friend id if that was deleted from civicrm
$searchActParams = array(
'entity_id' => $generatedEntities['civicrm_tell_friend'][$actKey],
- 'entity_table' => 'civicrm_tell_friend'
+ 'entity_table' => 'civicrm_tell_friend',
);
$compareActParams = array();
$this->assertDBCompareValues('CRM_Friend_DAO_Friend', $searchActParams, $compareActParams);
'version' => 3,
'name' => 'max_attachments',
'group' => CRM_Core_BAO_Setting::SYSTEM_PREFERENCES_NAME,
- 'domain_id' => 2
+ 'domain_id' => 2,
));
$this->assertEquals(3, $value);
'description' => NULL,
'help_text' => NULL,
'on_change' => array(// list of callbacks
- array(__CLASS__, '_testOnChange_onChangeExample')
+ array(__CLASS__, '_testOnChange_onChangeExample'),
),
),
));
array(
'field_name' => 'activity_date_time',
'field_type' => 'Activity',
- )
+ ),
));
$fields = CRM_Core_BAO_UFField::getAvailableFields($ufGroupId);
self::$webResponses = array(
'http-error' => array(
CRM_Utils_HttpClient::STATUS_DL_ERROR,
- NULL
+ NULL,
),
'bad-json' => array(
CRM_Utils_HttpClient::STATUS_OK,
- '<html>this is not json!</html>'
+ '<html>this is not json!</html>',
),
'invalid-ttl-document' => array(
CRM_Utils_HttpClient::STATUS_OK,
'markup' => '<h1>Invalid document</h1>',
),
),
- ))
+ )),
),
'first-valid-response' => array(
CRM_Utils_HttpClient::STATUS_OK,
'markup' => '<h1>First valid response</h1>',
),
),
- ))
+ )),
),
'second-valid-response' => array(
CRM_Utils_HttpClient::STATUS_OK,
'markup' => '<h1>Second valid response</h1>',
),
),
- ))
+ )),
),
'two-messages' => array(
CRM_Utils_HttpClient::STATUS_OK,
'components' => array('CiviMail'),
),
),
- ))
+ )),
),
'two-messages-halfbadcomp' => array(
CRM_Utils_HttpClient::STATUS_OK,
'components' => array('CiviMail'),
),
),
- ))
+ )),
),
);
}
$test->calls['send']++;
$test->assertEquals(array('to@example.org'), $recipients);
$test->assertEquals('Subject Example', $headers['Subject']);
- }
+ },
));
CRM_Utils_Hook::singleton()->setHook('civicrm_alterMailer',
$idx = new CRM_Core_InnoDBIndexer(TRUE, array(
'civicrm_contact' => array(
array('first_name', 'last_name'),
- array('foo')
+ array('foo'),
),
'civicrm_email' => array(
array('whiz'),
// create first managed entity ('foo')
$decls[] = array_merge($this->fixtures['com.example.one-foo'], array(
- 'cleanup' => 'never'
+ 'cleanup' => 'never',
));
$me = new CRM_Core_ManagedEntities($this->modules, $decls);
$me->reconcile();
// create first managed entity ('foo')
$decls[] = array_merge($this->fixtures['com.example.one-foo'], array(
- 'cleanup' => 'unused'
+ 'cleanup' => 'unused',
));
$me = new CRM_Core_ManagedEntities($this->modules, $decls);
$me->reconcile();
'name' => 'mock',
'type' => 'mock',
'count' => 1,
- )
+ ),
));
});
'',
'gid=2&reset=1',
'url=civicrm/newfoo/%%gid%%?reset=%%reset%%',
- '/index.php?q=civicrm/newfoo/2&reset=1'
+ '/index.php?q=civicrm/newfoo/2&reset=1',
);
return $cases;
'x_avs_code' => 'Z',
'x_response_reason_text' => 'This transaction has been approved.',
'x_response_reason_code' => '1',
- 'x_response_code' => '1'
+ 'x_response_code' => '1',
);
}
// (as least it will once the pseudoconstant s in the schema)
'payment_processor_type_id' => $this->callAPISuccess('payment_processor_type', 'getvalue', array(
'return' => 'id',
- 'name' => 'AuthNet'
+ 'name' => 'AuthNet',
)),
);
'shipping' => '0.00',
'product_type' => '1',
'time_created' => '12:02:25 May 14, 2013 PDT',
- 'ipn_track_id' => '912e5010eb5a6'
+ 'ipn_track_id' => '912e5010eb5a6',
);
}
/**
'receiver_email' => 'nil@civicrm.org',
'next_payment_date' => '03:00:00 Aug 14, 2013 PDT',
'tax' => '0.00',
- 'residence_country' => 'US'
+ 'residence_country' => 'US',
);
}
$cases[] = array("cms:unknown universal name", CRM_Core_Permission::ALWAYS_DENY_PERMISSION);
$cases[] = array(
"Joomla:civicrmplusplus.extragood:com_civicrmplusplus",
- array("civicrmplusplus.extragood", "com_civicrmplusplus")
+ array("civicrmplusplus.extragood", "com_civicrmplusplus"),
);
$cases[] = array("otherruntime:foo", CRM_Core_Permission::ALWAYS_DENY_PERMISSION);
$cases[] = array(CRM_Core_Permission::ALWAYS_DENY_PERMISSION, CRM_Core_Permission::ALWAYS_DENY_PERMISSION);
));
CRM_Core_Region::instance('testAllTypes')->add(array(
// note: returns a value which gets appended to the region
- 'callback' => create_function('&$spec, &$html', 'return "callback-return<br/>";')
+ 'callback' => create_function('&$spec, &$html', 'return "callback-return<br/>";'),
));
CRM_Core_Region::instance('testAllTypes')->add(array(
// note: returns void; directly modifies region's $html
- 'callback' => create_function('&$spec, &$html', '$html = "callback-ref<br/>" . $html;')
+ 'callback' => create_function('&$spec, &$html', '$html = "callback-ref<br/>" . $html;'),
));
CRM_Core_Region::instance('testAllTypes')->add(array(
'scriptUrl' => '/foo%20bar.js',
'receive_date' => date('Y-m-d') . " 00:00:00",
'skipLineItem' => 1,
'partial_payment_total' => $feeTotal,
- 'partial_amount_pay' => $actualPaidAmt
+ 'partial_amount_pay' => $actualPaidAmt,
);
$contribution = CRM_Contribute_BAO_Contribution::create($contributionParams);
public function testConvertPathsToUrls() {
$relPaths = array(
'foo.bar' => 'foo\bar',
- 'whiz.bang' => 'tests\extensions\whiz\bang'
+ 'whiz.bang' => 'tests\extensions\whiz\bang',
);
$expectedRelUrls = array(
'foo.bar' => 'foo/bar',
'visibility' => 'Public',
'is_active' => 1,
'fixed_period_start_day' => 101,
- 'fixed_period_rollover_day' => 1231
+ 'fixed_period_rollover_day' => 1231,
);
$ids = array();
$membershipType = CRM_Member_BAO_MembershipType::add($params, $ids);
),
'fixtures/dataset-ascii.sql',
'fixtures/report-ascii.csv',
- )
+ ),
);
}
$this->assertEquals(1, count($value['api.Address.get']['values']));
}
CRM_core_DAO::executeQuery('DELETE FROM civicrm_address WHERE contact_id=%1', array(
- 1 => array($this->noise['individual'], 'Positive')
+ 1 => array($this->noise['individual'], 'Positive'),
));
$this->callAPISuccess('Contact', 'delete', array(
'id' => $this->noise['individual'],
'last_name' => 'Last',
'nick_name' => 'Firstie',
'options' => array(
- 'reload' => 1
+ 'reload' => 1,
),
));
$this->assertEquals('First', $result['values'][$result['id']]['first_name']);
'email' => 'test@example.com',
),
'options' => array(
- 'reload' => 1
+ 'reload' => 1,
),
));
$this->assertEquals('First', $result['values'][$result['id']]['first_name']);
CRM_Core_DAO::executeQuery(
"UPDATE civicrm_contact SET nick_name = 'munged' WHERE id = %1",
array(
- 1 => array($objectId, 'Integer')
+ 1 => array($objectId, 'Integer'),
)
);
}
'lang' => 'en',
'msgid' => 'greeting',
'familiar' => FALSE,
- 'value' => 'Hello'
+ 'value' => 'Hello',
);
$inputs[] = array(
'lang' => 'en',
'msgid' => 'parting',
- 'value' => 'Goodbye'
+ 'value' => 'Goodbye',
);
$inputs[] = array(
'lang' => 'fr',
'msgid' => 'greeting',
- 'value' => 'Bon jour'
+ 'value' => 'Bon jour',
);
$inputs[] = array(
'lang' => 'fr',
'msgid' => 'parting',
- 'value' => 'Au revoir'
+ 'value' => 'Au revoir',
);
$inputs[] = array(
'lang' => 'en',
'msgid' => 'greeting',
'familiar' => TRUE,
- 'value' => 'Hey'
+ 'value' => 'Hey',
);
$inputs[] = array(
'msgid' => 'greeting',
'familiar' => TRUE,
- 'value' => 'Universal greeting'
+ 'value' => 'Universal greeting',
);
$byLangMsgid = CRM_Utils_Array::index(array('lang', 'msgid'), $inputs);
*/
public function testBasicXMLExports($customGroupParams, $fieldParams, $expectedXmlFilePath) {
$this->assertDBQuery(0, 'SELECT count(*) FROM civicrm_custom_group WHERE title = %1', array(
- 1 => array($customGroupParams['title'], 'String')
+ 1 => array($customGroupParams['title'], 'String'),
));
$customGroup = $this->customGroupCreate($customGroupParams);
$fieldParams['custom_group_id'] = $customGroup['id'];
*/
public function testBasicXMLImports($expectCustomGroup, $expectCustomField, $inputXmlFilePath) {
$this->assertDBQuery(0, 'SELECT count(*) FROM civicrm_custom_group WHERE title = %1', array(
- 1 => array($expectCustomGroup['title'], 'String')
+ 1 => array($expectCustomGroup['title'], 'String'),
));
$importer = new CRM_Utils_Migrate_Import();
->row(array('first' => '1', 'second' => '2'))
->rows(array(
array('second' => '2b', 'first' => '1b'),
- array('first' => '1c', 'second' => '2c')
+ array('first' => '1c', 'second' => '2c'),
))
->row(array('second' => '2d', 'first' => '1d'));
$expected = '
array(
'@escaped' => 'foo"bar',
'!unescaped' => 'concat(foo,bar)',
- '#validated' => 15.2
+ '#validated' => 15.2,
)
);
$this->assertLike('"foo\"bar" concat(foo,bar) 15.2', $actual);
array(
'@escaped' => array('foo"bar', "whiz", "null", NULL, "bang"),
'!unescaped' => array('foo"bar', 'bar'),
- '#validated' => array(1, 10, NULL, 100.1)
+ '#validated' => array(1, 10, NULL, 100.1),
)
);
$this->assertLike('("foo\\"bar", "whiz", "null", NULL, "bang") (foo"bar, bar) (1, 10, NULL, 100.1)', $actual);
public function testInterpolateBadNumber() {
try {
$result = CRM_Utils_SQL_Select::from('ignore')->interpolate('#num', array(
- '#num' => '5not-a-number5'
+ '#num' => '5not-a-number5',
));
$this->fail('Expected exception; got: ' . var_export($result, TRUE));
}
try {
$result = CRM_Utils_SQL_Select::from('ignore')->interpolate('#num', array(
- '#num' => array(1, '5not-a-number5', 2)
+ '#num' => array(1, '5not-a-number5', 2),
));
$this->fail('Expected exception; got: ' . var_export($result, TRUE));
}
public function testInterpolateBadKey() {
try {
$result = CRM_Utils_SQL_Select::from('ignore')->interpolate('this is a {var}', array(
- '{var}' => 'not a well-formed variable name'
+ '{var}' => 'not a well-formed variable name',
));
$this->fail('Expected exception; got: ' . var_export($result, TRUE));
}
array('version' => '4.2.16', 'date' => '2014-02-18'),
array('version' => '4.2.17', 'date' => '2014-07-01', 'security' => TRUE),
array('version' => '4.2.18', 'date' => '2014-08-06'),
- array('version' => '4.2.19', 'date' => '2014-09-17', 'security' => TRUE)
+ array('version' => '4.2.19', 'date' => '2014-09-17', 'security' => TRUE),
),
),
'4.3' => array(
array('version' => '4.3.6', 'date' => '2013-09-25'),
array('version' => '4.3.7', 'date' => '2013-10-02', 'security' => TRUE),
array('version' => '4.3.8', 'date' => '2013-11-06', 'security' => TRUE),
- array('version' => '4.3.9', 'date' => '2014-09-07', 'security' => TRUE)
+ array('version' => '4.3.9', 'date' => '2014-09-07', 'security' => TRUE),
),
),
'4.4' => array(
array('version' => '4.4.8', 'date' => '2014-10-14'),
array('version' => '4.4.9', 'date' => '2014-11-05'),
array('version' => '4.4.10', 'date' => '2014-11-19'),
- array('version' => '4.4.11', 'date' => '2014-12-17', 'security' => TRUE)
+ array('version' => '4.4.11', 'date' => '2014-12-17', 'security' => TRUE),
),
),
'4.5' => array(
array('version' => '4.5.3', 'date' => '2014-11-05'),
array('version' => '4.5.4', 'date' => '2014-11-19'),
array('version' => '4.5.5', 'date' => '2014-12-17', 'security' => TRUE),
- )
+ ),
),
'4.6' => array(
'status' => 'testing',
'releases' => array(
array('version' => '4.6.alpha1', 'date' => '2015-02-01'),
array('version' => '4.6.beta1', 'date' => '2015-03-01'),
- )
+ ),
),
);
$cases[] = array(
'FakeFile',
'create',
- array('entity_table' => 'fake_widget', 'entity_id' => self::WIDGET_ID)
+ array('entity_table' => 'fake_widget', 'entity_id' => self::WIDGET_ID),
);
$cases[] = array('FakeFile', 'get', array('entity_table' => 'fake_widget'));
'FakeFile',
'create',
array('entity_table' => 'fake_forbidden', 'entity_id' => self::FORBIDDEN_ID),
- '/Authorization failed/'
+ '/Authorization failed/',
);
$cases[] = array(
'FakeFile',
'get',
array('entity_table' => 'fake_forbidden', 'entity_id' => self::FORBIDDEN_ID),
- '/Authorization failed/'
+ '/Authorization failed/',
);
$cases[] = array('FakeFile', 'create', array(), "/Mandatory key\\(s\\) missing from params array: 'id' or 'entity_table/");
'first_name' => 'Me',
'last_name' => 'Myself',
'options' => array(
- 'force_rollback' => TRUE
+ 'force_rollback' => TRUE,
),
));
$this->assertTrue(is_numeric($result['id']));
// state where tests could run afterwards without re-loading.
$this->caseStatusGroup = $this->callAPISuccess('option_group', 'get', array(
'name' => 'case_status',
- 'format.only_id' => 1
+ 'format.only_id' => 1,
)
);
$optionValues = array(
$result = $this->webtest_civicrm_api("OptionValue", "getvalue", array(
'option_group_name' => $option_group_name,
'option.limit' => 1,
- 'return' => 'value'
+ 'return' => 'value',
));
return $result;
}
$result = $this->webtest_civicrm_api("Domain", "getvalue", array(
'current_domain' => 1,
'option.limit' => 1,
- 'return' => 'config_backend'
+ 'return' => 'config_backend',
));
$_config_backend = unserialize($result);
}
"{$customSet['entity']}_{$customSet['subEntity']}" => array(
'cgtitle' => $customGroupTitle,
'gid' => $gid,
- 'triggerElement' => $customSet['triggerElement']
- )
+ 'triggerElement' => $customSet['triggerElement'],
+ ),
);
// Go home for a sec to give time for caches to clear
'CiviMember',
'CiviMail',
'CiviReport',
- 'CiviPledge'
+ 'CiviPledge',
));
return TRUE;
'Acme',
'Roberts and Sons',
'Cryo Space Labs',
- 'Sharper Pens'
+ 'Sharper Pens',
),
),
'Household' => array(
'state_province' => 'Michigan',
'supplemental_address_1' => 'Hallmark Ct',
'supplemental_address_2' => 'Jersey Village',
- )
+ ),
);
$params = array(
//have a crack @ deleting it first in the hope this will prevent derailing our tests
$this->callAPISuccess('custom_group', 'get', array(
'title' => $params['title'],
- array('api.custom_group.delete' => 1)
+ array('api.custom_group.delete' => 1),
));
return $this->callAPISuccess('custom_group', 'create', $params);
$customField = $this->customFieldCreate(array(
'custom_group_id' => $ids['custom_group_id'],
- 'label' => 'field_1' . $ids['custom_group_id']
+ 'label' => 'field_1' . $ids['custom_group_id'],
));
$ids['custom_field_id'][] = $customField['id'];
$customField = $this->customFieldCreate(array(
'custom_group_id' => $ids['custom_group_id'],
'default_value' => '',
- 'label' => 'field_2' . $ids['custom_group_id']
+ 'label' => 'field_2' . $ids['custom_group_id'],
));
$ids['custom_field_id'][] = $customField['id'];
$customField = $this->customFieldCreate(array(
'custom_group_id' => $ids['custom_group_id'],
'default_value' => '',
- 'label' => 'field_3' . $ids['custom_group_id']
+ 'label' => 'field_3' . $ids['custom_group_id'],
));
$ids['custom_field_id'][] = $customField['id'];
$GLOBALS['_HTML_QuickForm_registered_rules'] = array(
'required' => array(
'html_quickform_rule_required',
- 'HTML/QuickForm/Rule/Required.php'
+ 'HTML/QuickForm/Rule/Required.php',
),
'maxlength' => array(
'html_quickform_rule_range',
- 'HTML/QuickForm/Rule/Range.php'
+ 'HTML/QuickForm/Rule/Range.php',
),
'minlength' => array(
'html_quickform_rule_range',
- 'HTML/QuickForm/Rule/Range.php'
+ 'HTML/QuickForm/Rule/Range.php',
),
'rangelength' => array(
'html_quickform_rule_range',
- 'HTML/QuickForm/Rule/Range.php'
+ 'HTML/QuickForm/Rule/Range.php',
),
'email' => array(
'html_quickform_rule_email',
- 'HTML/QuickForm/Rule/Email.php'
+ 'HTML/QuickForm/Rule/Email.php',
),
'regex' => array(
'html_quickform_rule_regex',
- 'HTML/QuickForm/Rule/Regex.php'
+ 'HTML/QuickForm/Rule/Regex.php',
),
'lettersonly' => array(
'html_quickform_rule_regex',
- 'HTML/QuickForm/Rule/Regex.php'
+ 'HTML/QuickForm/Rule/Regex.php',
),
'alphanumeric' => array(
'html_quickform_rule_regex',
- 'HTML/QuickForm/Rule/Regex.php'
+ 'HTML/QuickForm/Rule/Regex.php',
),
'numeric' => array(
'html_quickform_rule_regex',
- 'HTML/QuickForm/Rule/Regex.php'
+ 'HTML/QuickForm/Rule/Regex.php',
),
'nopunctuation' => array(
'html_quickform_rule_regex',
- 'HTML/QuickForm/Rule/Regex.php'
+ 'HTML/QuickForm/Rule/Regex.php',
),
'nonzero' => array(
'html_quickform_rule_regex',
- 'HTML/QuickForm/Rule/Regex.php'
+ 'HTML/QuickForm/Rule/Regex.php',
),
'callback' => array(
'html_quickform_rule_callback',
- 'HTML/QuickForm/Rule/Callback.php'
+ 'HTML/QuickForm/Rule/Callback.php',
),
'compare' => array(
'html_quickform_rule_compare',
- 'HTML/QuickForm/Rule/Compare.php'
- )
+ 'HTML/QuickForm/Rule/Compare.php',
+ ),
);
// FIXME: …ditto for $GLOBALS['HTML_QUICKFORM_ELEMENT_TYPES']
$GLOBALS['HTML_QUICKFORM_ELEMENT_TYPES'] = array(
'group' => array(
'HTML/QuickForm/group.php',
- 'HTML_QuickForm_group'
+ 'HTML_QuickForm_group',
),
'hidden' => array(
'HTML/QuickForm/hidden.php',
- 'HTML_QuickForm_hidden'
+ 'HTML_QuickForm_hidden',
),
'reset' => array(
'HTML/QuickForm/reset.php',
- 'HTML_QuickForm_reset'
+ 'HTML_QuickForm_reset',
),
'checkbox' => array(
'HTML/QuickForm/checkbox.php',
- 'HTML_QuickForm_checkbox'
+ 'HTML_QuickForm_checkbox',
),
'file' => array(
'HTML/QuickForm/file.php',
- 'HTML_QuickForm_file'
+ 'HTML_QuickForm_file',
),
'image' => array(
'HTML/QuickForm/image.php',
- 'HTML_QuickForm_image'
+ 'HTML_QuickForm_image',
),
'password' => array(
'HTML/QuickForm/password.php',
- 'HTML_QuickForm_password'
+ 'HTML_QuickForm_password',
),
'radio' => array(
'HTML/QuickForm/radio.php',
- 'HTML_QuickForm_radio'
+ 'HTML_QuickForm_radio',
),
'button' => array(
'HTML/QuickForm/button.php',
- 'HTML_QuickForm_button'
+ 'HTML_QuickForm_button',
),
'submit' => array(
'HTML/QuickForm/submit.php',
- 'HTML_QuickForm_submit'
+ 'HTML_QuickForm_submit',
),
'select' => array(
'HTML/QuickForm/select.php',
- 'HTML_QuickForm_select'
+ 'HTML_QuickForm_select',
),
'hiddenselect' => array(
'HTML/QuickForm/hiddenselect.php',
- 'HTML_QuickForm_hiddenselect'
+ 'HTML_QuickForm_hiddenselect',
),
'text' => array(
'HTML/QuickForm/text.php',
- 'HTML_QuickForm_text'
+ 'HTML_QuickForm_text',
),
'textarea' => array(
'HTML/QuickForm/textarea.php',
- 'HTML_QuickForm_textarea'
+ 'HTML_QuickForm_textarea',
),
'fckeditor' => array(
'HTML/QuickForm/fckeditor.php',
- 'HTML_QuickForm_FCKEditor'
+ 'HTML_QuickForm_FCKEditor',
),
'tinymce' => array(
'HTML/QuickForm/tinymce.php',
- 'HTML_QuickForm_TinyMCE'
+ 'HTML_QuickForm_TinyMCE',
),
'dojoeditor' => array(
'HTML/QuickForm/dojoeditor.php',
- 'HTML_QuickForm_dojoeditor'
+ 'HTML_QuickForm_dojoeditor',
),
'link' => array(
'HTML/QuickForm/link.php',
- 'HTML_QuickForm_link'
+ 'HTML_QuickForm_link',
),
'advcheckbox' => array(
'HTML/QuickForm/advcheckbox.php',
- 'HTML_QuickForm_advcheckbox'
+ 'HTML_QuickForm_advcheckbox',
),
'date' => array(
'HTML/QuickForm/date.php',
- 'HTML_QuickForm_date'
+ 'HTML_QuickForm_date',
),
'static' => array(
'HTML/QuickForm/static.php',
- 'HTML_QuickForm_static'
+ 'HTML_QuickForm_static',
),
'header' => array(
'HTML/QuickForm/header.php',
- 'HTML_QuickForm_header'
+ 'HTML_QuickForm_header',
),
'html' => array(
'HTML/QuickForm/html.php',
- 'HTML_QuickForm_html'
+ 'HTML_QuickForm_html',
),
'hierselect' => array(
'HTML/QuickForm/hierselect.php',
- 'HTML_QuickForm_hierselect'
+ 'HTML_QuickForm_hierselect',
),
'autocomplete' => array(
'HTML/QuickForm/autocomplete.php',
- 'HTML_QuickForm_autocomplete'
+ 'HTML_QuickForm_autocomplete',
),
'xbutton' => array(
'HTML/QuickForm/xbutton.php',
- 'HTML_QuickForm_xbutton'
+ 'HTML_QuickForm_xbutton',
),
'advmultiselect' => array(
'HTML/QuickForm/advmultiselect.php',
- 'HTML_QuickForm_advmultiselect'
- )
+ 'HTML_QuickForm_advmultiselect',
+ ),
);
}
$this->callAPISuccess('price_set', 'create', array(
'id' => $contributionPriceSet['id'],
'is_active' => 0,
- 'name' => 'old'
+ 'name' => 'old',
));
unset($contributionPriceSet['id']);
$newPriceSet = $this->callAPISuccess('price_set', 'create', $contributionPriceSet);
$priceField = $this->callAPISuccess('price_field', 'getsingle', array(
'price_set_id' => $firstID,
- 'options' => array('limit' => 1)
+ 'options' => array('limit' => 1),
));
unset($priceField['id']);
$priceField['price_set_id'] = $newPriceSet['id'];
$priceFieldValue = $this->callAPISuccess('price_field_value', 'getsingle', array(
'price_set_id' => $firstID,
'sequential' => 1,
- 'options' => array('limit' => 1)
+ 'options' => array('limit' => 1),
));
unset($priceFieldValue['id']);
'contact_id' => $this->_contactID,
'contribution_page_id' => $this->_contributionPageID,
'payment_processor_id' => $this->_paymentProcessorID,
- )
+ ),
));
$this->_contributionRecurID = $contributionRecur['id'];
$this->_contributionID = $contributionRecur['values']['0']['api.contribution.create']['id'];
'financial_type_id' => 1,
'price_field_id' => $this->callAPISuccess('price_field', 'getvalue', array(
'return' => 'id',
- 'label' => 'Membership Amount'
+ 'label' => 'Membership Amount',
)),
'price_field_value_id' => $this->callAPISuccess('price_field_value', 'getvalue', array(
'return' => 'id',
- 'label' => 'General'
+ 'label' => 'General',
)),
));
$this->callAPISuccess('membership_payment', 'create', array(
'contribution_id' => $this->_contributionID,
- 'membership_id' => $this->ids['membership']
+ 'membership_id' => $this->ids['membership'],
));
}
$triggerElement = array('name' => 'activity_type_id', 'type' => 'select');
$customSets = array(
array('entity' => 'Activity', 'subEntity' => 'Interview', 'triggerElement' => $triggerElement),
- array('entity' => 'Activity', 'subEntity' => 'Meeting', 'triggerElement' => $triggerElement)
+ array('entity' => 'Activity', 'subEntity' => 'Meeting', 'triggerElement' => $triggerElement),
);
$pageUrl = array('url' => 'activity', 'args' => 'reset=1&action=add&context=standalone');
$triggerElement = array('name' => 'campaign_type_id', 'type' => 'select');
$customSets = array(
array('entity' => 'Campaign', 'subEntity' => 'Referral Program', 'triggerElement' => $triggerElement),
- array('entity' => 'Campaign', 'subEntity' => 'Constituent Engagement', 'triggerElement' => $triggerElement)
+ array('entity' => 'Campaign', 'subEntity' => 'Constituent Engagement', 'triggerElement' => $triggerElement),
);
$pageUrl = array('url' => 'campaign/add', 'args' => 'reset=1');
'street_number' => '121',
'street_name' => 'SW Sherman Way',
'street_unit' => 'Suite 15',
- )
+ ),
);
foreach ($verifyData as $loc => $values) {
$num = $address[$loc];
$contactEmails = array(
1 => "{$firstName}.{$lastName}@example.com",
2 => "{$firstName2}.{$lastName2}@example.com",
- 3 => "{$firstName3}.{$lastName3}@example.com"
+ 3 => "{$firstName3}.{$lastName3}@example.com",
);
foreach ($contactEmails as $key => $value) {
return array(
'mainId' => $mainId,
- 'duplicateId' => $duplicateId
+ 'duplicateId' => $duplicateId,
);
}
}
$triggerElement = array('name' => 'relationship_type_id', 'type' => 'select');
$customSets = array(
array('entity' => 'Relationship', 'subEntity' => 'Partner of', 'triggerElement' => $triggerElement),
- array('entity' => 'Relationship', 'subEntity' => 'Spouse of', 'triggerElement' => $triggerElement)
+ array('entity' => 'Relationship', 'subEntity' => 'Spouse of', 'triggerElement' => $triggerElement),
);
$pageUrl = array('url' => 'contact/view/rel', 'args' => "cid={$contactId[1]}&action=add&reset=1");
$this->click("xpath=//div[@class='crm-accordion-header crm-master-accordion-header']");
$this->enterValues(1, 1, 'Contribution', 'Financial Type', NULL, 'IN', array(
$financialTypeName1,
- $financialTypeName2
+ $financialTypeName2,
));
$this->clickLink('_qf_Builder_refresh');
$this->waitForElementPresent("_qf_MembershipView_cancel-bottom");
$expected = array(
2 => 'General',
- 4 => 'New'
+ 4 => 'New',
);
foreach ($expected as $label => $value) {
$this->verifyText("xpath=id('MembershipView')/div[2]/div/table[1]/tbody/tr[$label]/td[2]", preg_quote($value));
4 => 'Donation',
2 => '50.00',
6 => 'Completed',
- 1 => "{$firstName} {$lastName}"
+ 1 => "{$firstName} {$lastName}",
);
foreach ($expected as $value => $label) {
$this->verifyText("xpath=//div[@class='view-content']//table[@class='selector row-highlight']//tbody/tr[2]/td[$value]", preg_quote($label));
'Financial Type' => 'Donation',
'Total Amount' => '0.00',
'Contribution Status' => 'Completed',
- 'Paid By' => 'Credit Card'
+ 'Paid By' => 'Credit Card',
);
$this->webtestVerifyTabularData($expected);
}
'From' => "{$firstName} {$lastName}",
'Financial Type' => 'Donation',
$amountLabel => $amountValue,
- 'Contribution Status' => 'Completed'
+ 'Contribution Status' => 'Completed',
);
$this->webtestVerifyTabularData($expected);
}
$triggerElement = array('name' => 'financial_type_id', 'type' => 'select');
$customSets = array(
array('entity' => 'Contribution', 'subEntity' => 'Donation', 'triggerElement' => $triggerElement),
- array('entity' => 'Contribution', 'subEntity' => 'Member Dues', 'triggerElement' => $triggerElement)
+ array('entity' => 'Contribution', 'subEntity' => 'Member Dues', 'triggerElement' => $triggerElement),
);
$pageUrl = array('url' => 'contribute/add', 'args' => 'reset=1&action=add&context=standalone');
'entity' => 'ParticipantEventName',
'subEntity' => 'Fall Fundraiser Dinner',
'triggerElement' => array('name' => "event_id", 'type' => "select2")),
- array('entity' => 'ParticipantRole', 'subEntity' => 'Attendee', 'triggerElement' => array('name' => 'role_id', 'type' => "select"))
+ array('entity' => 'ParticipantRole', 'subEntity' => 'Attendee', 'triggerElement' => array('name' => 'role_id', 'type' => "select")),
);
$pageUrl = array('url' => "participant/add", 'args' => "reset=1&action=add&context=standalone");
$this->customFieldSetLoadOnTheFlyCheck($customSets, $pageUrl, TRUE);
'subEntity' => 'Rain-forest Cup Youth Soccer Tournament',
'triggerElement' => array('name' => "event_id", 'type' => "select")),
array('entity' => 'ParticipantRole', 'subEntity' => '- Any -', 'triggerElement' => array('type' => "checkbox")),
- array('entity' => 'ParticipantRole', 'subEntity' => 'Volunteer', 'triggerElement' => array('type' => "checkbox"))
+ array('entity' => 'ParticipantRole', 'subEntity' => 'Volunteer', 'triggerElement' => array('type' => "checkbox")),
);
$return = $this->addCustomGroupField($customSets);
1 => array(
'label' => 'Chicken',
'amount' => '30.00',
- 'financial_type_id' => 'Donation'
+ 'financial_type_id' => 'Donation',
),
2 => array(
'label' => 'Vegetarian',
'amount' => '25.00',
- 'financial_type_id' => 'Donation'
+ 'financial_type_id' => 'Donation',
),
);
$this->addMultipleChoiceOptions($options, $validateStrings);
1 => array(
'label' => 'Yes',
'amount' => '50.00',
- 'financial_type_id' => 'Donation'
+ 'financial_type_id' => 'Donation',
),
2 => array(
'label' => 'No',
'amount' => '0',
- 'financial_type_id' => 'Donation'
+ 'financial_type_id' => 'Donation',
),
);
$this->addMultipleChoiceOptions($options, $validateStrings);
1 => array(
'label' => 'First Night',
'amount' => '15.00',
- 'financial_type_id' => 'Donation'
+ 'financial_type_id' => 'Donation',
),
2 => array(
'label' => 'Second Night',
'amount' => '15.00',
- 'financial_type_id' => 'Donation'
+ 'financial_type_id' => 'Donation',
),
);
$this->addMultipleChoiceOptions($options, $validateStrings);
$genderLabelArray = array(
1 => 'Female',
2 => 'Male',
- 3 => 'Transgender'
+ 3 => 'Transgender',
);
$prefix = rand(1, 4);
$suffix = rand(1, 8);
'sequential' => 1,
'option_group_name' => $optionGroupName,
'value' => $optionValue,
- 'return' => 'label'
+ 'return' => 'label',
);
$optionLabel = $this->webtest_civicrm_api("OptionValue", "getvalue", $params);
return $optionLabel;
'tax_rate' => $taxRate,
'is_tax' => 'on',
'is_deductible' => 'off',
- 'is_default' => 'off'
+ 'is_default' => 'off',
);
$this->assertEquals($orgName, $this->getText("xpath=//*[@id='s2id_contact_id']/a/span[1]"));
$this->clickLink("xpath=//div[@id='recently-viewed']/ul/li[1]/a", "_qf_Activity_cancel-bottom");
$this->webtestVerifyTabularData(
array(
- 'Current Attachment(s)' => 'Financial_Transactions_'
+ 'Current Attachment(s)' => 'Financial_Transactions_',
)
);
}
$triggerElement = array('name' => 'grant_type_id', 'type' => 'select');
$customSets = array(
array('entity' => 'Grant', 'subEntity' => 'Emergency', 'triggerElement' => $triggerElement),
- array('entity' => 'Grant', 'subEntity' => 'Family Support', 'triggerElement' => $triggerElement)
+ array('entity' => 'Grant', 'subEntity' => 'Family Support', 'triggerElement' => $triggerElement),
);
$pageUrl = array('url' => 'grant/add', 'args' => 'reset=1&action=add&context=standalone');
'Intended Recipients' =>
array(
'report' => array('report_name' => 'Mailing Details', 'Mailing' => "Mailing $mailingName Webtest"),
- 'search' => array('Mailing Name IN' => "\"Mailing {$mailingName} Webtest")
+ 'search' => array('Mailing Name IN' => "\"Mailing {$mailingName} Webtest"),
),
'Successful Deliveries' =>
array(
'report_name' => 'Mailing Details',
'Mailing' => "Mailing $mailingName Webtest",
"Delivery Status" => " Successful"),
- 'search' => array('Mailing Name IN' => "\"Mailing {$mailingName} Webtest", 'Mailing Delivery -' => "Successful")
+ 'search' => array('Mailing Name IN' => "\"Mailing {$mailingName} Webtest", 'Mailing Delivery -' => "Successful"),
),
'Tracked Opens' =>
array(
'report' => array('report_name' => 'Mail Opened', 'Mailing' => "Mailing $mailingName Webtest"),
- 'search' => array('Mailing Name IN' => "\"Mailing {$mailingName} Webtest", 'Mailing: Trackable Opens -' => "Opened")
+ 'search' => array('Mailing Name IN' => "\"Mailing {$mailingName} Webtest", 'Mailing: Trackable Opens -' => "Opened"),
),
'Click-throughs' =>
array(
'report' => array('report_name' => 'Mail Clickthroughs', 'Mailing' => "Mailing $mailingName Webtest"),
- 'search' => array('Mailing Name IN' => "\"Mailing {$mailingName} Webtest", 'Mailing: Trackable URL Clicks -' => "Clicked")
+ 'search' => array('Mailing Name IN' => "\"Mailing {$mailingName} Webtest", 'Mailing: Trackable URL Clicks -' => "Clicked"),
),
'Forwards' =>
array(
'report_name' => 'Mailing Details',
'Mailing' => "Mailing $mailingName Webtest",
'Forwarded' => 'Is equal to Yes'),
- 'search' => array('Mailing Name IN' => "\"Mailing {$mailingName} Webtest", 'Mailing: -' => "Forwards")
+ 'search' => array('Mailing Name IN' => "\"Mailing {$mailingName} Webtest", 'Mailing: -' => "Forwards"),
),
'Replies' =>
array(
'report_name' => 'Mailing Details',
'Mailing' => "Mailing $mailingName Webtest",
'Replied' => 'Is equal to Yes'),
- 'search' => array('Mailing Name IN' => "\"Mailing {$mailingName} Webtest", 'Mailing: Trackable Replies -' => "Replied")
+ 'search' => array('Mailing Name IN' => "\"Mailing {$mailingName} Webtest", 'Mailing: Trackable Replies -' => "Replied"),
),
'Bounces' =>
array(
'report' => array('report_name' => 'Mail Bounces', 'Mailing' => "Mailing $mailingName Webtest"),
- 'search' => array('Mailing Name IN' => "\"Mailing {$mailingName} Webtest", 'Mailing Delivery -' => "Bounced")
+ 'search' => array('Mailing Name IN' => "\"Mailing {$mailingName} Webtest", 'Mailing Delivery -' => "Bounced"),
),
'Unsubscribe Requests' =>
array(
'report_name' => 'Mailing Details',
'Mailing' => "Mailing $mailingName Webtest",
'Unsubscribed' => 'Is equal to Yes'),
- 'search' => array('Mailing Name IN' => "\"Mailing {$mailingName} Webtest", 'Mailing: -' => "Unsubscribe Requests")
+ 'search' => array('Mailing Name IN' => "\"Mailing {$mailingName} Webtest", 'Mailing: -' => "Unsubscribe Requests"),
),
'Opt-out Requests' =>
array(
'report_name' => 'Mailing Details',
'Mailing' => "Mailing $mailingName Webtest",
'Opted-out' => 'Is equal to Yes'),
- 'search' => array('Mailing Name IN' => "\"Mailing {$mailingName} Webtest", 'Mailing: -' => "Opt-out Requests")
+ 'search' => array('Mailing Name IN' => "\"Mailing {$mailingName} Webtest", 'Mailing: -' => "Opt-out Requests"),
),
);
$this->criteriaCheck($criteriaCheck, $mailingReportUrl);
'Member Since' => $joinDate,
'Start date' => $startDate,
'End date' => $endDate,
- 'Max related' => "5"
+ 'Max related' => "5",
)
);
$triggerElement = array('name' => 'membership_type_id_1', 'type' => 'select');
$customSets = array(
array('entity' => 'Membership', 'subEntity' => 'General', 'triggerElement' => $triggerElement),
- array('entity' => 'Membership', 'subEntity' => 'Student', 'triggerElement' => $triggerElement)
+ array('entity' => 'Membership', 'subEntity' => 'Student', 'triggerElement' => $triggerElement),
);
$pageUrl = array('url' => 'member/add', 'args' => 'reset=1&action=add&context=standalone');
array(
'type' => 'Individual',
'name' => 'Last Name',
- 'label' => 'Last Name'
- )
+ 'label' => 'Last Name',
+ ),
);
$this->addProfile($profileTitle, $profileFields);
$this->openCiviPage('contact/search', 'reset=1', '_qf_Basic_refresh');
$permissions = array(
'edit-2-profile-listings-and-forms',
'edit-2-access-all-custom-data',
- 'edit-2-access-civicrm'
+ 'edit-2-access-civicrm',
);
$this->changePermissions($permissions);
list($id, $profileTitle) = $this->_addNewProfile(TRUE, FALSE, TRUE);
$fields = array(
'first_name' => 'Individual',
'last_name' => 'Individual',
- 'email' => 'Contact'
+ 'email' => 'Contact',
);
$this->waitForElementPresent("field_name_0");
foreach ($fields as $field => $type) {
$this->clickLink("xpath=//table[@class='crm-group-selector no-footer dataTable']/tbody/tr/td[1]/span[text() = '$groupName']/parent::td/following-sibling::td[@class=' crm-group-group_links']/span/a");
$contactEmails = array(
1 => "$lastName1, $firstName1",
- 2 => "$lastName2, $firstName2"
+ 2 => "$lastName2, $firstName2",
);
foreach ($contactEmails as $row => $name) {
$this->assertTrue($this->isElementPresent("xpath=//div[@class='crm-search-results']/table/tbody/tr[$row]/td[4]/a[contains(text(), '$name')]"));
$relationshipInfo = array();
$relationshipInfo['data'] = array(
- array('field' => 'Relationship Is Active', 'changed_from' => 'true', 'changed_to' => 'false')
+ array('field' => 'Relationship Is Active', 'changed_from' => 'true', 'changed_to' => 'false'),
);
$relationshipInfo = array_merge($relationshipInfo, $data[2]);
"edit-{$roleId}-access-civireport",
"edit-{$roleId}-view-all-contacts",
"edit-{$roleId}-administer-reports",
- "edit-{$roleId}-access-civicrm"
+ "edit-{$roleId}-access-civicrm",
);
$this->changePermissions($permissions);
"edit-{$roleId}-view-all-contacts",
"edit-{$roleId}-administer-reports",
"edit-{$roleId}-access-civicrm",
- "edit-{$roleId}-administer-reserved-reports"
+ "edit-{$roleId}-administer-reserved-reports",
);
$this->changePermissions($permissions);
if (isset($this->nocms_contact_id)) {
$deleteParams = array(
"id" => $this->nocms_contact_id,
- "skip_undelete" => 1
+ "skip_undelete" => 1,
);
$res = $this->webtest_civicrm_api("Contact", "delete", $deleteParams);
unset($this->nocms_contact_id);
$contactParams = array(
"api_key" => $test_key,
"contact_type" => "Individual",
- "first_name" => "RestTester1"
+ "first_name" => "RestTester1",
);
$contact = $this->webtest_civicrm_api("Contact", "create", $contactParams);
$this->nocms_contact_id = $contact["id"];
"action" => "get",
"key" => $this->settings->siteKey,
"json" => "1",
- "api_key" => $test_key
+ "api_key" => $test_key,
);
list($status, $data) = $client->post($this->url, $params);
$this->assertEquals(CRM_Utils_HttpClient::STATUS_OK, $status);
$contactParams = array(
"api_key" => $test_key,
"contact_type" => "Individual",
- "first_name" => "RestTester1"
+ "first_name" => "RestTester1",
);
$contact = $this->webtest_civicrm_api("Contact", "create", $contactParams);
$this->nocms_contact_id = $contact["id"];
"q" => "civicrm/contact/get",
"key" => $this->settings->siteKey,
"json" => "1",
- "api_key" => $test_key
+ "api_key" => $test_key,
);
list($status, $data) = $client->post($this->url, $params);
$this->assertEquals(CRM_Utils_HttpClient::STATUS_OK, $status);
'phone_type_id',
'phone',
'worldregion_id',
- 'world_region'
+ 'world_region',
);
$expectedReturnElements = array_diff(array_keys($fullresult['values'][0]), $elementsReturnDoesntSupport);
$result = $this->callAPISuccess('contact', 'get', array(
$this->_permissionedDisabledGroup = $this->groupCreate(array(
'title' => 'pick-me-disabled',
'is_active' => 0,
- 'name' => 'pick-me-disabled'
+ 'name' => 'pick-me-disabled',
));
$this->_permissionedGroup = $this->groupCreate(array(
'title' => 'pick-me-active',
'is_active' => 1,
- 'name' => 'pick-me-active'
+ 'name' => 'pick-me-active',
));
$this->setupACL();
}
'end_action' => 'before',
'end_date' => 'activity_date_time',
'body_html' => 'Test description',
- 'subject' => 'Test subject'
+ 'subject' => 'Test subject',
);
$actionSchedule = $this->callAPISuccess('action_schedule', 'create', $params);
$this->assertTrue(is_numeric($actionSchedule['id']), "In line " . __LINE__);
'option_group_id' => 2,
'name' => 'Test activity type',
'label' => 'Test activity type',
- 'sequential' => 1
+ 'sequential' => 1,
));
$this->test_activity_type_value = $activityTypes['values'][0]['value'];
$this->test_activity_type_id = $activityTypes['id'];
'return.assignee_contact_id' => 1,
'return.target_contact_id' => 1,
'return.source_contact_id' => 1,
- 'id' => $result['id']
+ 'id' => $result['id'],
)
);
$this->callAPISuccess('address', 'create', array_merge($this->_params, $individualParams));
$this->callAPISuccess('relationship', 'getcount', array(
'contact_id_a' => $individualID,
- 'contact_id_b' => $this->_contactID
+ 'contact_id_b' => $this->_contactID,
));
}
$this->callAPISuccess('address', 'create', array_merge($this->_params, $individualParams));
$this->callAPISuccess('relationship', 'getcount', array(
'contact_id_a' => $individualID,
- 'contact_id_b' => $this->_contactID
+ 'contact_id_b' => $this->_contactID,
));
}
$this->callAPISuccessGetCount('relationship', array(
'contact_id_a' => $individualID,
'is_active' => TRUE,
- 'contact_id_b' => $organisation2ID
+ 'contact_id_b' => $organisation2ID,
), 1);
}
'description' => 'My test description',
'options' => array(
'move-file' => $this->tmpFile('mytest.txt'),
- )
+ ),
),
'This comes from a file',
);
'description' => 'My test description',
'content' => 'too much content',
'options' => array(
- 'move-file' => $this->tmpFile('too-much.txt')
+ 'move-file' => $this->tmpFile('too-much.txt'),
),
),
"/'content' and 'options.move-file' are mutually exclusive/",
'check_permissions' => 1,
$readOnlyField => $newValue,
),
- "/Cannot modify $readOnlyField/"
+ "/Cannot modify $readOnlyField/",
);
}
$this->assertTrue(is_numeric($fileId));
$this->assertEquals($exists, file_exists($apiResult['values'][$fileId]['path']));
$this->assertDBQuery($exists ? 1 : 0, 'SELECT count(*) FROM civicrm_file WHERE id = %1', array(
- 1 => array($fileId, 'Int')
+ 1 => array($fileId, 'Int'),
));
$this->assertDBQuery($exists ? 1 : 0, 'SELECT count(*) FROM civicrm_entity_file WHERE id = %1', array(
- 1 => array($fileId, 'Int')
+ 1 => array($fileId, 'Int'),
));
}
'contact',
'get',
array(
- 'contact_type' => $contactType
+ 'contact_type' => $contactType,
)
);
'caseRoles' => array(
array('name' => 'First role', 'creator' => 1, 'manager' => 1),
),
- )
+ ),
);
}
$check = $this->callAPISuccess($this->_entity, 'get', array(
'return.custom_' . $ids['custom_field_id'] => 1,
- 'id' => $result['id']
+ 'id' => $result['id'],
));
$this->assertEquals("custom string", $check['values'][$check['id']]['custom_' . $ids['custom_field_id']]);
//here we will just do the get for set-up purposes
$count = $this->callAPISuccess('contact', 'getcount', array(
'organization_name' => 'new employer org',
- 'contact_type' => 'Organization'
+ 'contact_type' => 'Organization',
));
$this->assertEquals(0, $count);
$employerResult = $this->callAPISuccess('contact', 'create', array_merge($this->_params, array(
// do it again as an update to check it doesn't cause an error
$employerResult = $this->callAPISuccess('contact', 'create', array_merge($this->_params, array(
'current_employer' => 'new employer org',
- 'id' => $employerResult['id']
+ 'id' => $employerResult['id'],
)
));
$expectedCount = 1;
$this->callAPISuccess('contact', 'getcount', array(
'organization_name' => 'new employer org',
- 'contact_type' => 'Organization'
+ 'contact_type' => 'Organization',
),
$expectedCount);
$this->callAPISuccess('relationship', 'create', array('id' => $relationship['id'], 'is_active' => 0));
$this->callAPISuccess('relationship', 'getvalue', array(
'id' => $relationship['id'],
- 'return' => 'is_active'
+ 'return' => 'is_active',
), 0);
//re-set the current employer - thus enabling the relationshp
$this->callAPISuccess('contact', 'create', array_merge($this->_params, array(
'current_employer' => 'new employer org',
- 'id' => $employerResult['id']
+ 'id' => $employerResult['id'],
)
));
//check is_active is now 1
'first_name' => 'bb',
'last_name' => 'ccc',
'contact_type' => 'Individual',
- 'is_deceased' => 1
+ 'is_deceased' => 1,
));
$result = $this->callAPISuccess($this->_entity, 'get', array('is_deceased' => 0));
$this->assertFalse(array_key_exists($c2['id'], $result['values']));
$c2 = $this->callAPISuccess($this->_entity, 'create', array(
'first_name' => 'bb',
'last_name' => 'ccc',
- 'contact_type' => 'Individual'
+ 'contact_type' => 'Individual',
));
$result = $this->callAPISuccess($this->_entity, 'get', array(
'sort' => 'first_name ASC',
$c2 = $this->callAPISuccess($this->_entity, 'create', array(
'first_name' => 'bb',
'last_name' => 'ccc',
- 'contact_type' => 'Individual'
+ 'contact_type' => 'Individual',
));
$c3 = $this->callAPISuccess($this->_entity, 'create', array(
'first_name' => 'hh',
'last_name' => 'll',
- 'contact_type' => 'Individual'
+ 'contact_type' => 'Individual',
));
$result = $this->callAPISuccess($this->_entity, 'get', array('id' => array('IN' => array($c1['id'], $c3['id']))));
$this->assertEquals(2, $result['count']);
$c2 = $this->callAPISuccess($this->_entity, 'create', array(
'first_name' => 'bb',
'last_name' => 'ccc',
- 'contact_type' => 'Individual'
+ 'contact_type' => 'Individual',
));
$result = $this->callAPISuccess($this->_entity, 'getvalue', array(
'return' => 'first_name',
$check = $this->callAPIAndDocument($this->_entity, 'get', array(
'return.custom_' . $ids['custom_field_id'] => 1,
- 'id' => $result['id']
+ 'id' => $result['id'],
), __FUNCTION__, __FILE__, $description, $subfile);
$this->assertEquals("custom string", $check['values'][$check['id']]['custom_' . $ids['custom_field_id']]);
'contact_id' => $contactID,
'address_name' => 'My house',
'location_type_id' => 'Home',
- 'street_address' => '1 my road'
+ 'street_address' => '1 my road',
));
$result = $this->callAPISuccessGetSingle('contact', array(
'return' => 'address_name, street_address',
- 'id' => $contactID
+ 'id' => $contactID,
));
$this->assertEquals('1 my road', $result['street_address']);
$this->assertEquals('My house', $result['address_name']);
$this->assertEquals(date('Y-m-d', strtotime('first day of next month -20 years')), $result['values'][$contact3['id']]['birth_date']);
$result = $this->callAPISuccess('contact', 'get', array(
'birth_date_low' => date('Y-m-d', strtotime('-6 years')),
- 'birth_date_high' => date('Y-m-d', strtotime('- 3 years'))
+ 'birth_date_high' => date('Y-m-d', strtotime('- 3 years')),
));
$this->assertEquals(1, $result['count']);
$this->assertEquals(date('Y-m-d', strtotime('first day of next month -5 years')), $result['values'][$contact2['id']]['birth_date']);
$result = $this->callAPISuccess('contact', 'get', array(
'birth_date_low' => '-6 years',
- 'birth_date_high' => '- 3 years'
+ 'birth_date_high' => '- 3 years',
));
$this->assertEquals(1, $result['count']);
$this->assertEquals(date('Y-m-d', strtotime('first day of next month -5 years')), $result['values'][$contact2['id']]['birth_date']);
$this->assertEquals(date('Y-m-d', strtotime('first day of next month -20 years')), $result['values'][$contact3['id']]['deceased_date']);
$result = $this->callAPISuccess('contact', 'get', array(
'deceased_date_low' => '-6 years',
- 'deceased_date_high' => date('Y-m-d', strtotime('- 3 years'))
+ 'deceased_date_high' => date('Y-m-d', strtotime('- 3 years')),
));
$this->assertEquals(1, $result['count']);
$this->assertEquals(date('Y-m-d', strtotime('first day of next month -5 years')), $result['values'][$contact2['id']]['deceased_date']);
//now we check they are still returned with 'return' key
$result = $this->callAPISuccess('contact', 'getsingle', array(
'id' => $contactID,
- 'return' => array_keys($extraParams)
+ 'return' => array_keys($extraParams),
));
foreach ($extraParams as $key => $value) {
$this->assertEquals($result[$key], $value);
'phone' => '222-222-2222',
'location_type_id' => 1,
'phone_type_id' => 2,
- )
- )
+ ),
+ ),
);
$this->callAPISuccess('contact', 'create', $params);
$this->callAPISuccessGetCount('phone', array('contact_id' => $contactID), 2);
$moreids = $this->CustomGroupMultipleCreateWithFields();
$andmoreids = $this->CustomGroupMultipleCreateWithFields(array(
'title' => "another group",
- 'name' => 'another name'
+ 'name' => 'another name',
));
$description = "/*this demonstrates the usage of chained api functions. A variety of techniques are used";
$subfile = "APIChainedArrayMultipleCustom";
'contact_type' => 'Individual',
'first_name' => 'Foo',
'last_name' => 'Bear',
- 'check_permissions' => TRUE
+ 'check_permissions' => TRUE,
);
$result = $this->callAPISuccess('contact', 'create', $params);
$config = CRM_Core_Config::singleton();
'id' => $result['id'],
'contact_type' => 'Individual',
'last_name' => 'Bar',
- 'check_permissions' => TRUE
+ 'check_permissions' => TRUE,
);
$config->userPermissionClass->permissions = array('access CiviCRM');
'add contacts',
'view all contacts',
'edit all contacts',
- 'import contacts'
+ 'import contacts',
);
$this->callAPISuccess('contact', 'update', $params, NULL, 'overfluous permissions should be enough to update a contact');
}
'email' => 'spam@dev.null',
'is_primary' => 0,
'location_type_id' => 1,
- )
+ ),
),
),
'api.Phone.replace' => array(
//$refCountsIdx = CRM_Utils_Array::index(array('name'), $refCounts);
$refCounts = $this->callAPISuccess('Contact', 'getrefcount', array(
- 'id' => $result['id']
+ 'id' => $result['id'],
));
$refCountsIdx = CRM_Utils_Array::index(array('name'), $refCounts['values']);
$this->callAPISuccess('address', 'create', array(
'contact_id' => $contactID,
'city' => 'Cool City',
- 'location_type_id' => 1
+ 'location_type_id' => 1,
));
$result = $this->callAPISuccess('contact', 'get', array('city' => 'Cool City', 'return' => 'contact_type'));
$this->assertEquals(1, $result['count']);
// Force-exclude the deceased contact
$result = $this->callAPISuccess('contact', 'getlist', array(
'input' => $name,
- 'params' => array('is_deceased' => 0)
+ 'params' => array('is_deceased' => 0),
));
$this->assertEquals(1, $result['count'], 'In line ' . __LINE__);
$this->assertEquals($contact, $result['values'][0]['id'], 'In line ' . __LINE__);
'is_quick_config' => 1,
'extends' => 'CiviContribute',
'financial_type_id' => 'Donation',
- 'title' => 'my Page'
+ 'title' => 'my Page',
);
}
$submitParams = array(
'price_' . $priceFieldID => $priceFieldValueID,
'id' => (int) $this->_ids['contribution_page'],
- 'amount' => 10
+ 'amount' => 10,
);
$this->callAPISuccess('contribution_page', 'submit', $submitParams);
$this->callAPIAndDocument('contribution_page', 'submit', $submitParams, __FUNCTION__, __FILE__, 'submit contribution page', NULL, 'Submit');
$contributions = $this->callAPISuccess('contribution', 'get', array(
'contribution_page_id' => $this->_ids['contribution_page'],
- 'contribution_status_id' => 1
+ 'contribution_status_id' => 1,
));
$this->assertCount(2, $contributions['values']);
$membershipPayment = $this->callAPISuccess('membership_payment', 'getsingle', array());
$this->callAPIAndDocument('contribution_page', 'submit', $submitParams, __FUNCTION__, __FILE__, 'submit contribution page', NULL, 'Submit');
$contribution = $this->callAPISuccess('contribution', 'getsingle', array(
'contribution_page_id' => $this->_ids['contribution_page'],
- 'contribution_status_id' => 1
+ 'contribution_status_id' => 1,
));
$membershipPayment = $this->callAPISuccess('membership_payment', 'getsingle', array());
$this->assertEquals($membershipPayment['contribution_id'], $contribution['id']);
$this->callAPISuccess('contribution', 'getsingle', array(
'id' => array('NOT IN' => array($contribution['id'])),
'contribution_page_id' => $this->_ids['contribution_page'],
- 'contribution_status_id' => 1
+ 'contribution_status_id' => 1,
));
$renewedMembership = $this->callAPISuccessGetSingle('membership', array('id' => $membershipPayment['membership_id']));
$this->assertEquals(date('Y-m-d', strtotime('+ 1 year', strtotime($membership['end_date']))), $renewedMembership['end_date']);
$this->callAPIAndDocument('contribution_page', 'submit', $submitParams, __FUNCTION__, __FILE__, 'submit contribution page', NULL, 'Submit');
$contribution = $this->callAPISuccess('contribution', 'getsingle', array(
'contribution_page_id' => $this->_ids['contribution_page'],
- 'contribution_status_id' => 2
+ 'contribution_status_id' => 2,
));
$membershipPayment = $this->callAPISuccess('membership_payment', 'getsingle', array());
$this->assertEquals($membershipPayment['contribution_id'], $contribution['id']);
//$this->callAPISuccess('line_item', 'getsingle', array('contribution_id' => $contribution['id'], 'entity_id' => $membership['id']));
$this->callAPISuccess('contribution', 'completetransaction', array(
'id' => $contribution['id'],
- 'trxn_id' => 'ipn_called'
+ 'trxn_id' => 'ipn_called',
));
$membership = $this->callAPISuccessGetSingle('membership', array('id' => $membershipPayment['membership_id']));
//renew it with processor setting completed - should extend membership
$this->callAPISuccess('contribution_page', 'submit', $submitParams);
$newContribution = $this->callAPISuccess('contribution', 'getsingle', array(
'id' => array(
- 'NOT IN' => array($contribution['id'])
+ 'NOT IN' => array($contribution['id']),
),
'contribution_page_id' => $this->_ids['contribution_page'],
- 'contribution_status_id' => 2
+ 'contribution_status_id' => 2,
)
);
public function setUpMembershipBlockPriceSet() {
$this->_ids['price_set'][] = $this->callAPISuccess('price_set', 'getvalue', array(
'name' => 'default_membership_type_amount',
- 'return' => 'id'
+ 'return' => 'id',
));
if (empty($this->_ids['membership_type'])) {
$this->_ids['membership_type'] = array($this->membershipTypeCreate(array('minimum_fee' => 2)));
$contribution = $this->callAPISuccess('contribution', 'create', $params);
$contribution = $this->callAPISuccess('contribution', 'get', array(
'sequential' => 1,
- 'id' => $contribution['id']
+ 'id' => $contribution['id'],
));
$this->assertArrayHasKey('payment_instrument', $contribution['values'][0]);
$this->assertEquals('EFT', $contribution['values'][0]['payment_instrument']);
$this->callAPISuccess('contribution', 'create', array(
'id' => $contribution['id'],
- 'payment_instrument' => 'Credit Card'
+ 'payment_instrument' => 'Credit Card',
));
$contribution = $this->callAPISuccess('contribution', 'get', array(
'sequential' => 1,
- 'id' => $contribution['id']
+ 'id' => $contribution['id'],
));
$this->assertArrayHasKey('payment_instrument', $contribution['values'][0]);
$this->assertEquals('Credit Card', $contribution['values'][0]['payment_instrument']);
$this->callAPISuccess('contribution', 'create', $params2);
$contribution = $this->callAPISuccess('contribution', 'get', array(
'sequential' => 1,
- 'contribution_payment_instrument_id' => 'Cash'
+ 'contribution_payment_instrument_id' => 'Cash',
));
$this->assertArrayHasKey('payment_instrument', $contribution['values'][0]);
$this->assertEquals('Cash', $contribution['values'][0]['payment_instrument']);
$this->assertEquals(1, $contribution['count']);
$contribution = $this->callAPISuccess('contribution', 'get', array(
'sequential' => 1,
- 'payment_instrument_id' => 'EFT'
+ 'payment_instrument_id' => 'EFT',
));
$this->assertArrayHasKey('payment_instrument', $contribution['values'][0]);
$this->assertEquals('EFT', $contribution['values'][0]['payment_instrument']);
$this->assertEquals(1, $contribution['count']);
$contribution = $this->callAPISuccess('contribution', 'get', array(
'sequential' => 1,
- 'payment_instrument_id' => 5
+ 'payment_instrument_id' => 5,
));
$this->assertArrayHasKey('payment_instrument', $contribution['values'][0]);
$this->assertEquals('EFT', $contribution['values'][0]['payment_instrument']);
$this->assertEquals(1, $contribution['count']);
$contribution = $this->callAPISuccess('contribution', 'get', array(
'sequential' => 1,
- 'payment_instrument' => 'EFT'
+ 'payment_instrument' => 'EFT',
));
$this->assertArrayHasKey('payment_instrument', $contribution['values'][0]);
$this->assertEquals('EFT', $contribution['values'][0]['payment_instrument']);
$this->assertEquals(1, $contribution['count']);
$contribution = $this->callAPISuccess('contribution', 'create', array(
'id' => $contribution['id'],
- 'payment_instrument' => 'Credit Card'
+ 'payment_instrument' => 'Credit Card',
));
$contribution = $this->callAPISuccess('contribution', 'get', array('sequential' => 1, 'id' => $contribution['id']));
$this->assertArrayHasKey('payment_instrument', $contribution['values'][0]);
$result = $this->callAPISuccess('note', 'get', array(
'entity_table' => 'civicrm_contribution',
'entity_id' => $contribution['id'],
- 'sequential' => 1
+ 'sequential' => 1,
));
$this->assertEquals('my contribution note', $result['values'][0]['note']);
$this->callAPISuccess('contribution', 'delete', array('id' => $contribution['id']));
$result = $this->callAPISuccess('note', 'get', array(
'entity_table' => 'civicrm_contribution',
'entity_id' => $contribution['id'],
- 'sequential' => 1
+ 'sequential' => 1,
));
$this->assertEquals('my contribution note', $result['values'][0]['note']);
$this->callAPISuccess('contribution', 'delete', array('id' => $contribution['id']));
$subfile = "ContributionCreateWithSoftCredit";
$contact2 = $this->callAPISuccess('Contact', 'create', array(
'display_name' => 'superman',
- 'contact_type' => 'Individual'
+ 'contact_type' => 'Individual',
));
$softparams = array(
'contact_id' => $contact2['id'],
'amount' => 50,
- 'soft_credit_type_id' => 3
+ 'soft_credit_type_id' => 3,
);
$params = $this->_params + array('soft_credit' => array(1 => $softparams));
$subfile = "ContributionCreateWithSoftCreditDefaults";
$contact2 = $this->callAPISuccess('Contact', 'create', array(
'display_name' => 'superman',
- 'contact_type' => 'Individual'
+ 'contact_type' => 'Individual',
));
$params = $this->_params + array(
'soft_credit_to' => $contact2['id'],
$subfile = "ContributionCreateWithHonoreeContact";
$contact2 = $this->callAPISuccess('Contact', 'create', array(
'display_name' => 'superman',
- 'contact_type' => 'Individual'
+ 'contact_type' => 'Individual',
));
$params = $this->_params + array(
'honor_contact_id' => $contact2['id'],
$contribution = $this->callAPISuccess('contribution', 'create', $this->_params);
$contribution = $this->callAPISuccess('contribution', 'getsingle', array(
'id' => $contribution['id'],
- 'api.contribution.delete' => 1
+ 'api.contribution.delete' => 1,
));
$this->assertEquals(1, $contribution['contribution_status_id']);
$this->assertEquals('Check', $contribution['payment_instrument']);
$newParams = array(
'id' => $contribution['id'],
- 'total_amount' => '125'
+ 'total_amount' => '125',
);
$contribution = $this->callAPISuccess('contribution', 'create', $newParams);
$this->callAPISuccess('contribution', 'create', array('id' => $contribution['id'], 'source' => 'new source'));
$contribution = $this->callAPISuccess('contribution', 'getsingle', array(
'id' => $contribution['id'],
- 'api.contribution.delete' => 1
+ 'api.contribution.delete' => 1,
));
$this->assertEquals(2, $contribution['contribution_status_id']);
}
);
$participantStatus = $this->callAPISuccessGetValue('participant', array(
'id' => $this->_ids['participant'],
- 'return' => 'participant_status_id'
+ 'return' => 'participant_status_id',
));
$this->assertEquals(1, $participantStatus);
$mut->checkMailLog(array(
'is_quick_config' => 0,
'extends' => 'CiviMember',
'financial_type_id' => 1,
- 'title' => 'my Page'
+ 'title' => 'my Page',
));
$priceSetID = $priceSet['id'];
'Contribution Information',
'Please print this confirmation for your records',
), array(
- 'Event'
+ 'Event',
)
);
$mut->stop();
$contribution = $this->callAPISuccess('contribution', 'create', $params);
$this->callAPISuccess('participant_payment', 'create', array(
'contribution_id' => $contribution['id'],
- 'participant_id' => $participantID
+ 'participant_id' => $participantID,
));
$this->callAPISuccess('line_item', 'get', array(
'entity_id' => $contribution['id'],
'first_name' => 'abc1',
'contact_type' => 'Individual',
'last_name' => 'xyz1',
- 'email' => 'abc@abc.com'
+ 'email' => 'abc@abc.com',
)
);
$oldCount = CRM_Core_DAO::singleValueQuery("select count(*) from civicrm_dashboard_contact where contact_id = {$contact['id']} AND is_active = 1 AND dashboard_id = {$dashresult['id']}");
'api.email.create' => array(
'location_type_id' => $defaultLocationType->id,
'email' => 'my@email.com',
- )
+ ),
)
);
public function testCallUpdateGreetingSuccess() {
$result = $this->callAPISuccess($this->_entity, 'update_greeting', array(
'gt' => 'postal_greeting',
- 'ct' => 'Individual'
+ 'ct' => 'Individual',
));
}
$this->callAPISuccess('group_contact', 'create', array(
'contact_id' => $contactID,
'status' => 'Added',
- 'group_id' => $groupID
+ 'group_id' => $groupID,
));
}
$result = $this->callAPISuccess('job', 'send_reminder', array());
$this->callAPISuccess('group_contact', 'create', array(
'contact_id' => $contactID,
'status' => 'Added',
- 'group_id' => $groupID
+ 'group_id' => $groupID,
));
}
if ($i > 1) {
CRM_Utils_Hook_UnitTests::singleton()->setHook('civicrm_pre', array($this, 'hookPreRelationship'));
$relationshipTypeID = $this->callAPISuccess('relationship_type', 'getvalue', array(
'return' => 'id',
- 'name_a_b' => 'Employee of'
+ 'name_a_b' => 'Employee of',
));
$result = $this->callAPISuccess('relationship', 'create', array(
'relationship_type_id' => $relationshipTypeID,
$this->assertDBQuery($expectedA, 'SELECT count(*) FROM civicrm_mailing_job WHERE mailing_id = %1', array(
1 => array(
$this->_mailingID_A,
- 'Integer'
- )
+ 'Integer',
+ ),
));
$this->assertDBQuery($expectedB, 'SELECT count(*) FROM civicrm_mailing_job WHERE mailing_id = %1', array(
1 => array(
$this->_mailingID_B,
- 'Integer'
- )
+ 'Integer',
+ ),
));
$this->assertDBQuery($expectedC, 'SELECT count(*) FROM civicrm_mailing_job WHERE mailing_id = %1', array(
1 => array(
$this->_mailingID_C,
- 'Integer'
- )
+ 'Integer',
+ ),
));
}
}
$this->assertEquals($params['scheduled_date'], $submitResult['values'][$id]['scheduled_date']);
}
$this->assertDBQuery($expectedJobCount, 'SELECT count(*) FROM civicrm_mailing_job WHERE mailing_id = %1', array(
- 1 => array($id, 'Integer')
+ 1 => array($id, 'Integer'),
));
}
'Bounces' => 20,
'Opened' => 20,
'Unique Clicks' => 0,
- 'Unsubscribers' => 20
+ 'Unsubscribers' => 20,
);
$this->checkArrayEquals($expectedResult, $result['values'][$mail['id']]);
}
$createResult = $this->callAPISuccess('mailing', 'create', $createParams, __FUNCTION__, __FILE__);
$this->assertTrue(is_numeric($createResult['id']));
$this->assertDBQuery(0, 'SELECT count(*) FROM civicrm_mailing_job WHERE mailing_id = %1', array(
- 1 => array($createResult['id'], 'Integer')
+ 1 => array($createResult['id'], 'Integer'),
));
return $createResult['id'];
}
$this->_membershipTypeID2 = $this->membershipTypeCreate(array(
'period_type' => 'fixed',
'fixed_period_start_day' => '301',
- 'fixed_period_rollover_day' => '1111'
+ 'fixed_period_rollover_day' => '1111',
));
$this->_membershipStatusID = $this->membershipStatusCreate('test status');
$membershipID = $this->contactMembershipCreate($this->_params);
$this->assertDBRowExist('CRM_Member_DAO_Membership', $membershipID);
$params = array(
- 'id' => $membershipID
+ 'id' => $membershipID,
);
$this->callAPIAndDocument('membership', 'delete', $params, __FUNCTION__, __FILE__);
$this->assertDBRowNotExist('CRM_Member_DAO_Membership', $membershipID);
$result = $this->callAPIAndDocument($this->_entity, 'create', $params, __FUNCTION__, __FILE__);
$check = $this->callAPISuccess($this->_entity, 'get', array(
'id' => $result['id'],
- 'contact_id' => $this->_contactID
+ 'contact_id' => $this->_contactID,
));
$this->assertEquals("custom string", $check['values'][$result['id']]['custom_' . $ids['custom_field_id']], ' in line ' . __LINE__);
}
$result = $this->callAPIAndDocument($this->_entity, 'create', $params, __FUNCTION__, __FILE__);
$result = $this->callAPISuccess($this->_entity, 'create', array(
'id' => $result['id'],
- 'custom_' . $ids['custom_field_id'] => "new custom"
+ 'custom_' . $ids['custom_field_id'] => "new custom",
));
$check = $this->callAPISuccess($this->_entity, 'get', array(
'id' => $result['id'],
- 'contact_id' => $this->_contactID
+ 'contact_id' => $this->_contactID,
));
$this->assertEquals("new custom", $check['values'][$result['id']]['custom_' . $ids['custom_field_id']], ' in line ' . __LINE__);
$entity = $this->createTestEntity();
$result = $this->callAPIAndDocument('MessageTemplate', 'delete', array('id' => $entity['id']), __FUNCTION__, __FILE__);
$checkDeleted = $this->callAPISuccess($this->entity, 'get', array(
- 'id' => $entity['id']
+ 'id' => $entity['id'],
));
$this->assertEquals(0, $checkDeleted['count'], 'In line ' . __LINE__);
}
'sequential' => 1,
'api.option_value.create' => array(
'component_id' => 'CiviContribute',
- 'name' => 'my@y.com'
+ 'name' => 'my@y.com',
),
));
'sequential' => 1,
'api.option_value.create' => array(
'component_id' => 'CiviContribute',
- 'name' => 'my@y.com'
+ 'name' => 'my@y.com',
),
));
// create a option group
$og = $this->callAPISuccess('option_group', 'create', array(
'name' => 'our test Option Group for with group id',
- 'is_active' => 1
+ 'is_active' => 1,
));
// create a option value
$ov = $this->callAPISuccess('option_value', 'create',
$this->callAPISuccess('option_value', 'create', array(
'id' => $ov['id'],
'option_group_id' => $og['id'],
- 'is_active' => 0
+ 'is_active' => 0,
));
$val = $this->callAPISuccess('option_value', 'getvalue', array(
'id' => $ov['id'],
public function tearDown() {
$this->eventDelete($this->_eventID);
$tablesToTruncate = array(
- 'civicrm_custom_group', 'civicrm_custom_field', 'civicrm_contact', 'civicrm_participant'
+ 'civicrm_custom_group', 'civicrm_custom_field', 'civicrm_contact', 'civicrm_participant',
);
// true tells quickCleanup to drop any tables that might have been created in the test
$this->quickCleanup($tablesToTruncate, TRUE);
'event_id',
'participant_register_date',
'participant_source',
- )
+ ),
);
$result = $this->callAPISuccess('participant', 'get', $params);
$this->assertAPISuccess($result, " in line " . __LINE__);
'contact_id' => $this->_contactID,
'return.status_id' => 1,
'return.participant_status_id' => 1,
- 'options' => array('limit' => 1)
+ 'options' => array('limit' => 1),
);
$result = $this->callAPISuccess('participant', 'get', $params);
$this->assertArrayHasKey('participant_status_id', $result['values'][$result['id']]);
public function testUpdate() {
$participantId = $this->participantCreate(array(
'contactID' => $this->_individualId,
- 'eventID' => $this->_eventID
+ 'eventID' => $this->_eventID,
));
$params = array(
'id' => $participantId,
//ensure that correct number of payments created & last payment has the right date
$payments = $this->callAPISuccess('PledgePayment', 'Get', array(
'pledge_id' => $pledge['id'],
- 'sequential' => 1
+ 'sequential' => 1,
));
$this->assertEquals(1, $payments['count'], 'In line ' . __LINE__);
$this->assertEquals(2, $payments['values'][0]['status_id'], 'In line ' . __LINE__);
'price_field_id' => $this->priceFieldID,
'name' => 'ryegrass',
'label' => 'juicy and healthy',
- 'amount' => 1
+ 'amount' => 1,
);
$membershipOrgId = $this->organizationCreate(NULL);
'field_type' => 'Contact',
'location_type_id' => 1,
'phone_type_id' => 1,
- 'label' => 'Phone'
+ 'label' => 'Phone',
),
array(
'field_name' => 'country',
'visibility' => 'Public Pages and Listings',
'field_type' => 'Contact',
'location_type_id' => 1,
- 'label' => 'Country'
+ 'label' => 'Country',
),
array(
'field_name' => 'state_province',
'visibility' => 'Public Pages and Listings',
'field_type' => 'Contact',
'location_type_id' => 1,
- 'label' => 'State Province'
+ 'label' => 'State Province',
),
array(
'field_name' => 'postal_code',
'is_required' => 0,
'field_type' => 'Contact',
'location_type_id' => 1,
- 'label' => 'State Province'
+ 'label' => 'State Province',
),
),
);
$this->_cId_a_2 = $this->individualCreate(array(
'last_name' => 'c2',
'email' => 'c@w.com',
- 'contact_type' => 'Individual'
+ 'contact_type' => 'Individual',
));
$this->_cId_b = $this->organizationCreate();
$this->_cId_b2 = $this->organizationCreate(array('organization_name' => ' Org 2'));
$rel1 = $this->callAPISuccess('relationship', 'create', $this->_params);
$getParams = array(
- 'filters' => array('is_current' => 1)
+ 'filters' => array('is_current' => 1),
);
$description = "demonstrates is_current filter";
$subfile = 'filterIsCurrent';
array('relationship_type_id' => $relationType4)));
$getParams = array(
- 'relationship_type_id' => array('IN' => array($relationType2, $relationType3))
+ 'relationship_type_id' => array('IN' => array($relationType2, $relationType3)),
);
$description = "demonstrates use of IN filter";
$description = "demonstrates use of NOT IN filter";
$subfile = 'NotInRelationshipType';
$getParams = array(
- 'relationship_type_id' => array('NOT IN' => array($relationType2, $relationType3))
+ 'relationship_type_id' => array('NOT IN' => array($relationType2, $relationType3)),
);
$result = $this->callAPIAndDocument('relationship', 'get', $getParams, __FUNCTION__, __FILE__, $description, $subfile);
$this->assertEquals($result['count'], 2);
$description = "demonstrates use of BETWEEN filter";
$subfile = 'BetweenRelationshipType';
$getParams = array(
- 'relationship_type_id' => array('BETWEEN' => array($relationType2, $relationType4))
+ 'relationship_type_id' => array('BETWEEN' => array($relationType2, $relationType4)),
);
$result = $this->callAPIAndDocument('relationship', 'get', $getParams, __FUNCTION__, __FILE__, $description, $subfile);
$this->assertEquals($result['count'], 3);
$description = "demonstrates use of Not BETWEEN filter";
$subfile = 'NotBetweenRelationshipType';
$getParams = array(
- 'relationship_type_id' => array('NOT BETWEEN' => array($relationType2, $relationType4))
+ 'relationship_type_id' => array('NOT BETWEEN' => array($relationType2, $relationType4)),
);
$result = $this->callAPIAndDocument('relationship', 'get', $getParams, __FUNCTION__, __FILE__, $description, $subfile);
$this->assertEquals($result['count'], 1);
$this->callAPISuccess($this->_entity, 'create',
array_merge($this->_params, array(
'relationship_type_id' => $relType2,
- 'contact_id_b' => $this->_cId_b2
+ 'contact_id_b' => $this->_cId_b2,
))
);
$this->callAPISuccess($this->_entity, 'create',
array_merge($this->_params, array(
'relationship_type_id' => $relType3,
- 'contact_id_b' => $org3
+ 'contact_id_b' => $org3,
))
);
$this->callAPISuccess($this->_entity, 'create',
array_merge($this->_params, array(
'relationship_type_id' => $relType2,
- 'contact_id_b' => $this->_cId_b2
+ 'contact_id_b' => $this->_cId_b2,
))
);
$this->callAPISuccess($this->_entity, 'create',
array_merge($this->_params, array(
'relationship_type_id' => $relType3,
- 'contact_id_b' => $org3
+ 'contact_id_b' => $org3,
))
);
$this->callAPISuccess($this->_entity, 'create',
array_merge($this->_params, array(
'relationship_type_id' => $relType2,
- 'contact_id_b' => $this->_cId_b2
+ 'contact_id_b' => $this->_cId_b2,
))
);
$this->callAPISuccess($this->_entity, 'create',
array_merge($this->_params, array(
'relationship_type_id' => $relType3,
- 'contact_id_b' => $org3
+ 'contact_id_b' => $org3,
))
);
array_merge($this->_params, array(
'relationship_type_id' => $relType1,
'contact_id_a' => $this->_cId_a,
- 'contact_id_b' => $this->_cId_a_2
+ 'contact_id_b' => $this->_cId_a_2,
))
);
$this->callAPISuccess($this->_entity, 'create',
array_merge($this->_params, array(
'relationship_type_id' => $relType2,
- 'contact_id_b' => $this->_cId_b2
+ 'contact_id_b' => $this->_cId_b2,
))
);
$this->callAPISuccess($this->_entity, 'create',
array_merge($this->_params, array(
'relationship_type_id' => $relType3,
- 'contact_id_b' => $org3
+ 'contact_id_b' => $org3,
))
);
array_merge($this->_params, array(
'relationship_type_id' => $relType1,
'contact_id_a' => $this->_cId_a,
- 'contact_id_b' => $this->_cId_a_2
+ 'contact_id_b' => $this->_cId_a_2,
))
);
$description = "Retrieve rows from a report template (optionally providing the instance_id)";
$result = $this->callAPIAndDocument('report_template', 'getrows', array(
'report_id' => 'contact/summary',
- 'options' => array('metadata' => array('labels', 'title'))
+ 'options' => array('metadata' => array('labels', 'title')),
), __FUNCTION__, __FILE__, $description, 'Getrows', 'getrows');
$this->assertEquals('Contact Name', $result['metadata']['labels']['civicrm_contact_sort_name']);
'description' => NULL,
'help_text' => NULL,
'on_change' => array(// list of callbacks
- array(__CLASS__, '_testOnChange_onChangeExample')
+ array(__CLASS__, '_testOnChange_onChangeExample'),
),
),
));
$params = array(
'domain_id' => 'all',
- 'return' => 'uniq_email_per_site'
+ 'return' => 'uniq_email_per_site',
);
// we'll check it with a 'get'
$description = "shows getting a variable for all domains";
public function testGetSetConfigSettingMultipleDomains() {
$settings = $this->callAPISuccess('setting', 'create', array(
'defaultCurrency' => 'USD',
- 'domain_id' => $this->_currentDomain
+ 'domain_id' => $this->_currentDomain,
)
);
$settings = $this->callAPISuccess('setting', 'create', array(
'defaultCurrency' => 'CAD',
- 'domain_id' => $this->_domainID2
+ 'domain_id' => $this->_domainID2,
)
);
$settings = $this->callAPISuccess('setting', 'get', array(
public function testGetValue() {
$params = array(
'name' => 'petition_contacts',
- 'group' => 'Campaign Preferences'
+ 'group' => 'Campaign Preferences',
);
$description = "Demonstrates getvalue action - intended for runtime use as better caching than get";
$result = $this->callAPISuccess('setting', 'create', $params);
$this->assertAPISuccess($result, "in line " . __LINE__);
$revertParams = array(
- 'name' => 'address_format'
+ 'name' => 'address_format',
);
$result = $this->callAPISuccess('setting', 'get', $params);
//make sure it's set
$surveyID = $survey['id'];
$this->params = array(
'sequential' => '1',
- 'survey_id' => $surveyID
+ 'survey_id' => $surveyID,
);
}
$tmp = civicrm_api('Entity', 'Get', array('version' => 3));
if (getenv('SYNTAX_CONFORMANCE_ENTITIES')) {
$tmp = array(
- 'values' => explode(' ', getenv('SYNTAX_CONFORMANCE_ENTITIES'))
+ 'values' => explode(' ', getenv('SYNTAX_CONFORMANCE_ENTITIES')),
);
}
'PaymentProcessor',
'Setting',
'MailingContact',
- 'SystemLog' //skip this because it doesn't make sense to update logs
+ 'SystemLog' //skip this because it doesn't make sense to update logs,
);
if ($sequential === TRUE) {
return $entitiesWithout;
'state_province_id', //issues with country id - need to ensure same country
'master_id', //creates relationship
),
- 'cant_return' => array()
+ 'cant_return' => array(),
),
'Batch' => array(
'cant_update' => array(
),
'cant_return' => array(
'entity_table',
- )
+ ),
),
'CaseType' => array(
'cant_update' => array(
'definition',
- )
+ ),
),
'MembershipBlock' => array(
'cant_update' => array(
// The fake/auto-generated values leave us unable to properly cleanup fake data
'entity_type',
'entity_id',
- )
+ ),
),
'Pledge' => array(
'cant_update' => array(
'installments',
'original_installment_amount',
'next_pay_date',
- 'amount' // can't be changed through API
+ 'amount' // can't be changed through API,
),
'break_return' => array(// if these are passed in they are retrieved from the wrong table
'honor_contact_id',
'contribution_page_id',
'financial_account_id',
'financial_type_id',
- 'currency'
+ 'currency',
),
'cant_return' => array(// can't be retrieved from api
'honor_type_id', //due to uniquename missing
'pledge_status_id',
'pledge_campaign_id',
'pledge_financial_type_id',
- )
+ ),
),
'PaymentProcessorType' => array(
'cant_update' => array(
$this->assertAPISuccess($createResult);
$eventId = $createResult['id'];
$this->assertDBQuery('createNew: CiviCRM <> TheRest', 'SELECT title FROM civicrm_event WHERE id = %1', array(
- 1 => array($eventId, 'Integer')
+ 1 => array($eventId, 'Integer'),
));
$this->assertDBQuery('createNew: TheRest <> CiviCRM', 'SELECT description FROM civicrm_event WHERE id = %1', array(
- 1 => array($eventId, 'Integer')
+ 1 => array($eventId, 'Integer'),
));
// Verify that "create" handles encoding for updates
));
$this->assertAPISuccess($createWithIdResult);
$this->assertDBQuery('createWithId: CiviCRM <> TheRest', 'SELECT title FROM civicrm_event WHERE id = %1', array(
- 1 => array($eventId, 'Integer')
+ 1 => array($eventId, 'Integer'),
));
$this->assertDBQuery('createWithId: TheRest <> CiviCRM', 'SELECT description FROM civicrm_event WHERE id = %1', array(
- 1 => array($eventId, 'Integer')
+ 1 => array($eventId, 'Integer'),
));
// Verify that "setvalue" handles encoding for updates
));
$this->assertAPISuccess($setValueTitleResult);
$this->assertDBQuery('setValueTitle: CiviCRM <> TheRest', 'SELECT title FROM civicrm_event WHERE id = %1', array(
- 1 => array($eventId, 'Integer')
+ 1 => array($eventId, 'Integer'),
));
$setValueDescriptionResult = civicrm_api('Event', 'setvalue', array(
'version' => 3,
//$this->assertTrue((bool)$setValueDescriptionResult['is_error']); // not supported by setValue
$this->assertAPISuccess($setValueDescriptionResult);
$this->assertDBQuery('setValueDescription: TheRest <> CiviCRM', 'SELECT description FROM civicrm_event WHERE id = %1', array(
- 1 => array($eventId, 'Integer')
+ 1 => array($eventId, 'Integer'),
));
}
}
$this->callAPISuccess('system', 'log', array('level' => 'info', 'message' => 'We wish you a merry Christmas'));
$result = $this->callAPISuccess('SystemLog', 'getsingle', array(
'sequential' => 1,
- 'message' => array('LIKE' => '%Chris%')
+ 'message' => array('LIKE' => '%Chris%'),
));
$this->assertEquals($result['message'], 'We wish you a merry Christmas');
$this->assertEquals($result['level'], 'info');
$this->callAPISuccess('system', 'log', array('message' => 'We wish you a merry Christmas', 'level' => 'alert'));
$result = $this->callAPISuccess('SystemLog', 'getsingle', array(
'sequential' => 1,
- 'message' => array('LIKE' => '%Chris%')
+ 'message' => array('LIKE' => '%Chris%'),
));
$this->assertEquals($result['message'], 'We wish you a merry Christmas');
$this->assertEquals($result['level'], 'alert');
$description = "Demonstrates use of api.getlist for autocomplete and quicksearch applications";
$params = array(
'input' => $this->tag['name'],
- 'extra' => array('used_for')
+ 'extra' => array('used_for'),
);
$result = $this->callAPIAndDocument('tag', 'getlist', $params, __FUNCTION__, __FILE__, $description);
$this->assertEquals($this->tag['id'], $result['values'][0]['id'], 'In line ' . __LINE__);
'pay_later_text' => 'I will pay later',
'pay_later_receipt' => "I will pay later",
'is_monetary' => TRUE,
- 'is_billing_required' => TRUE
+ 'is_billing_required' => TRUE,
);
$this->_priceSetParams = array(
'extends' => 2,
'financial_type_id' => 3,
'is_quick_config' => 0,
- 'is_reserved' => 0
+ 'is_reserved' => 0,
);
// Financial Account with 20% tax rate
$financialAccountSetparams = array(
'entity_table' => 'civicrm_financial_type',
'entity_id' => $this->financialtypeID,
'account_relationship' => 10,
- 'financial_account_id' => $this->financialAccountId
+ 'financial_account_id' => $this->financialAccountId,
);
$financialRelation = CRM_Financial_BAO_FinancialTypeAccount::add($financialRelationParams);
'tax_rate' => 5.00,
'is_reserved' => 0,
'is_active' => 1,
- 'is_default' => 0
+ 'is_default' => 0,
);
$halfFinancialAccount = CRM_Financial_BAO_FinancialAccount::add($financialAccHalftax);
$this->halfFinancialAccId = $halfFinancialAccount->id;
'entity_table' => 'civicrm_financial_type',
'entity_id' => $this->halfFinancialTypeId,
'account_relationship' => 10,
- 'financial_account_id' => $this->halfFinancialAccId
+ 'financial_account_id' => $this->halfFinancialAccId,
);
$halfFinancialRelation = CRM_Financial_BAO_FinancialTypeAccount::add($financialRelationHalftax);
'class_name' => 'Payment_Dummy',
'billing_mode' => 1,
'is_recur' => 1,
- 'payment_type' => 1
+ 'payment_type' => 1,
);
$result = $this->callAPISuccess('payment_processor', 'create', $paymentProceParams);
$this->_ids['paymentProcessID'] = $result['id'];
'civicrm_contact',
'civicrm_membership',
'civicrm_membership_payment',
- 'civicrm_payment_processor'
+ 'civicrm_payment_processor',
));
CRM_Core_PseudoConstant::flush('taxRates');
}
'price_field_id' => $priceField['id'],
'label' => 'Long Haired Goat',
'amount' => 100,
- 'financial_type_id' => $this->financialtypeID
+ 'financial_type_id' => $this->financialtypeID,
));
$priceFieldValue = $this->callAPISuccess('price_field_value', 'create', array(
'price_set_id' => $priceSetID,
'price_field_id' => $priceField['id'],
'label' => 'Shoe-eating Goat',
'amount' => 300,
- 'financial_type_id' => $this->halfFinancialTypeId
+ 'financial_type_id' => $this->halfFinancialTypeId,
));
$this->_ids['price_field_value'] = array($priceFieldValue['id']);
}
'trxn_id' => 12345,
'invoice_id' => 67890,
'source' => 'SSF',
- 'contribution_status_id' => 1
+ 'contribution_status_id' => 1,
);
$contribution = $this->callAPIAndDocument('contribution', 'create', $params, __FUNCTION__, __FILE__);
$newParams = array(
'id' => $contribution['id'],
'financial_type_id' => 1, // without tax rate i.e Donation
- 'total_amount' => '300'
+ 'total_amount' => '300',
);
$contribution = $this->callAPISuccess('contribution', 'update', $newParams);
'title' => 'Edited Test Profile',
'help_post' => 'Profile Pro help text.',
'is_active' => 1,
- 'id' => $this->_ufGroupId
+ 'id' => $this->_ufGroupId,
);
$result = $this->callAPISuccess('uf_group', 'create', $params);
'contact_id' => $this->_contactID,
'modified_date' => '2011-01-31',
'subject' => NULL,
- 'version' => $this->_apiversion
+ 'version' => $this->_apiversion,
);
try {
$result = civicrm_api3_verify_mandatory($params, 'CRM_Core_BAO_Note', array('note', 'subject'));
public function testGetMetadata() {
$result = $this->callAPIAndDocument($this->_entity, 'get', array(
'options' => array(
- 'metadata' => array('fields')
+ 'metadata' => array('fields'),
)), __FUNCTION__, __FILE__, 'Demonostrates returning field metadata', 'GetWithMetadata');
$this->assertEquals('Website', $result['metadata']['fields']['url']['title']);
}
<?php
CRM_Core_Resources::singleton()->addSetting(array(
- 'strings' => array('One, two, three' => 'Un, deux, trois')
+ 'strings' => array('One, two, three' => 'Un, deux, trois'),
)
);
// CRM_Core_Resources::singleton()->addScriptFile(...);