'url' => CRM_Utils_System::url('civicrm/admin/access',
'reset=1'
),
- )
+ ),
);
CRM_Utils_System::appendBreadCrumb($breadCrumb);
// what action to take ?
$roles = CRM_Core_OptionGroup::values('acl_role');
$group = array(
- '-1' => ts('- select -'),
- '0' => ts('All Groups'),
- ) + CRM_Core_PseudoConstant::group();
+ '-1' => ts('- select -'),
+ '0' => ts('All Groups'),
+ ) + CRM_Core_PseudoConstant::group();
$customGroup = array(
- '-1' => ts('- select -'),
- '0' => ts('All Custom Groups'),
- ) + CRM_Core_PseudoConstant::get('CRM_Core_DAO_CustomField', 'custom_group_id');
+ '-1' => ts('- select -'),
+ '0' => ts('All Custom Groups'),
+ ) + CRM_Core_PseudoConstant::get('CRM_Core_DAO_CustomField', 'custom_group_id');
$ufGroup = array(
- '-1' => ts('- select -'),
- '0' => ts('All Profiles'),
- ) + CRM_Core_PseudoConstant::get('CRM_Core_DAO_UFField', 'uf_group_id');
+ '-1' => ts('- select -'),
+ '0' => ts('All Profiles'),
+ ) + CRM_Core_PseudoConstant::get('CRM_Core_DAO_UFField', 'uf_group_id');
$event = array(
- '-1' => ts('- select -'),
- '0' => ts('All Events'),
- ) + CRM_Event_PseudoConstant::event();
+ '-1' => ts('- select -'),
+ '0' => ts('All Events'),
+ ) + CRM_Event_PseudoConstant::event();
while ($dao->fetch()) {
$acl[$dao->id] = array();
'attributes' => array(
'multiple' => TRUE,
'create' => TRUE,
- 'api' => array('params' => array('is_deceased' => 0))
+ 'api' => array('params' => array('is_deceased' => 0)),
),
),
'followup_assignee_contact_id' => array(
'attributes' => array(
'multiple' => TRUE,
'create' => TRUE,
- 'api' => array('params' => array('is_deceased' => 0))
+ 'api' => array('params' => array('is_deceased' => 0)),
),
),
'followup_activity_type_id' => array(
if (in_array($this->_values['name'], array(
'encounter_medium',
'case_type',
- 'case_status'
+ 'case_status',
))) {
static $caseCount = NULL;
if (!isset($caseCount)) {
//get the survey activities.
$activityStatus = CRM_Core_PseudoConstant::activityStatus('name');
$statusIds = array();
- foreach (array(
- 'Scheduled'
- ) as $name) {
+ foreach (array('Scheduled') as $name) {
if ($statusId = array_search($name, $activityStatus)) {
$statusIds[] = $statusId;
}
'name' => ts('Reserve'),
'subName' => 'reserve',
'isDefault' => TRUE,
- )
+ ),
);
if (CRM_Core_Permission::check('manage campaign') ||
if ($printReport) {
if (!in_array($label, array(
'Activity Type',
- 'Status'
+ 'Status',
))
) {
$caseActivities[$activityindex][$fieldindex] = array();
if ($form->_context == 'standalone') {
$form->addEntityRef('client_id', ts('Client'), array(
'create' => TRUE,
- 'multiple' => $form->_allowMultiClient
+ 'multiple' => $form->_allowMultiClient,
), TRUE);
}
if (!$primaryID &&
in_array($name, array(
'email',
- 'openid'
+ 'openid',
)) && !empty($blockValues[$name])
) {
$primaryID = $blockValues[$name];
if ($this->_action == CRM_Core_Action::UPDATE) {
$deleteExtra = ts('Are you sure you want to delete contact image.');
$deleteURL = array(
- CRM_Core_Action::DELETE =>
- array(
- 'name' => ts('Delete Contact Image'),
- 'url' => 'civicrm/contact/image',
- 'qs' => 'reset=1&cid=%%id%%&action=delete',
- 'extra' =>
- 'onclick = "if (confirm( \'' . $deleteExtra . '\' ) ) this.href+=\'&confirmed=1\'; else return false;"',
- ),
+ CRM_Core_Action::DELETE => array(
+ 'name' => ts('Delete Contact Image'),
+ 'url' => 'civicrm/contact/image',
+ 'qs' => 'reset=1&cid=%%id%%&action=delete',
+ 'extra' =>
+ 'onclick = "if (confirm( \'' . $deleteExtra . '\' ) ) this.href+=\'&confirmed=1\'; else return false;"',
+ ),
);
$deleteURL = CRM_Core_Action::formLink($deleteURL,
CRM_Core_Action::DELETE,
'provider_id',
'country_id',
'website_type_id',
- 'master_id'
+ 'master_id',
);
foreach ($fields as $name => $value) {
$skipField = FALSE;
$duplicateContactsLinks = '<div class="matching-contacts-found">';
$duplicateContactsLinks .= ts('One matching contact was found. ', array(
'count' => count($contactLinks['rows']),
- 'plural' => '%count matching contacts were found.<br />'
+ 'plural' => '%count matching contacts were found.<br />',
));
if ($contactLinks['msg'] == 'view') {
$duplicateContactsLinks .= ts('You can View the existing contact', array(
'count' => count($contactLinks['rows']),
- 'plural' => 'You can View the existing contacts'
+ 'plural' => 'You can View the existing contacts',
));
}
else {
$duplicateContactsLinks .= ts('You can View or Edit the existing contact', array(
'count' => count($contactLinks['rows']),
- 'plural' => 'You can View or Edit the existing contacts'
+ 'plural' => 'You can View or Edit the existing contacts',
));
}
if ($contactLinks['msg'] == 'merge') {
foreach (array(
'street_number',
'street_name',
- 'street_unit'
+ 'street_unit',
) as $fld) {
if (!empty($address[$fld])) {
$parseFieldName = 'street_number';
'street_number',
'street_number_suffix',
'street_name',
- 'street_unit'
+ 'street_unit',
) as $fld) {
if (in_array($fld, array(
'street_name',
- 'street_unit'
+ 'street_unit',
))) {
$streetAddress .= ' ';
}
'binary',
'varbinary',
'text',
- 'blob'
+ 'blob',
))
) {
$length = NULL;
if (array_key_exists('contribution_amount_low', $this->_formValues)) {
foreach (array(
'contribution_amount_low',
- 'contribution_amount_high'
+ 'contribution_amount_high',
) as $f) {
$this->_formValues[$f] = CRM_Utils_Rule::cleanMoney($this->_formValues[$f]);
}
'case_type_id',
'case_status_id',
'case_deleted',
- 'case_tags'
+ 'case_tags',
) as $caseCriteria) {
if (!empty($this->_formValues[$caseCriteria])) {
$allCases = TRUE;
'status_id',
'activity_subject',
'participant_status_id',
- 'participant_role_id'
+ 'participant_role_id',
);
foreach ($specialParams as $element) {
$value = CRM_Utils_Array::value($element, $this->_formValues);
if ($notAdded) {
$status[] = ts('%count contact already had this tag', array(
'count' => $notAdded,
- 'plural' => '%count contacts already had this tag'
+ 'plural' => '%count contacts already had this tag',
));
}
$status = '<ul><li>' . implode('</li><li>', $status) . '</li></ul>';
// add select for Location Type
$this->addElement('select', 'location_type_id', ts('Select Location'),
array(
- '' => ts('Primary')
+ '' => ts('Primary'),
) + CRM_Core_PseudoConstant::get('CRM_Core_DAO_Address', 'location_type_id'), TRUE
);
'email',
'phone',
'im',
- 'openid'
+ 'openid',
))) {
if ($k == 'im') {
$rows[$value][$k] = $v['1']['name'];
'street_number',
'street_name',
'street_unit',
- 'street_number_suffix'
+ 'street_number_suffix',
) as $fld) {
unset($params[$fld]);
}
'contact_id',
'is_billing',
'display',
- 'master_id'
+ 'master_id',
))) {
continue;
}
'state',
'state_name',
'country',
- 'world_region'
+ 'world_region',
) as $fld) {
if (isset($address->$fld)) {
unset($address->$fld);
$matches = array();
if (in_array($locale, array(
'en_CA',
- 'fr_CA'
+ 'fr_CA',
)) && preg_match('/^([A-Za-z0-9]+)[ ]*\-[ ]*/', $streetAddress, $matches)
) {
$parseFields['street_unit'] = $matches[1];
// overwriting $streetUnitFormats for 'en_CA' and 'fr_CA' locale
if (in_array($locale, array(
'en_CA',
- 'fr_CA'
+ 'fr_CA',
))) {
$streetUnitFormats = array('APT', 'APP', 'SUITE', 'BUREAU', 'UNIT');
}
*
* @return array
*/
- public static function getTagsUsedFor($usedFor = array(
- 'civicrm_contact'
- ),
- $buildSelect = TRUE,
- $all = FALSE,
- $parentId = NULL
+ public static function getTagsUsedFor(
+ $usedFor = array('civicrm_contact'),
+ $buildSelect = TRUE,
+ $all = FALSE,
+ $parentId = NULL
) {
$tags = array();
$dao = CRM_Core_DAO::executeQuery($query, array(
1 => array(
'%' . $entityTable . '%',
- 'String'
- )
+ 'String',
+ ),
), TRUE, NULL, FALSE, FALSE);
while ($dao->fetch()) {
$tagSets[$dao->id] = $dao->name;
// Respond with JSON if in AJAX context (also support legacy value '6')
if ($allowAjax && !empty($_REQUEST['snippet']) && in_array($_REQUEST['snippet'], array(
CRM_Core_Smarty::PRINT_JSON,
- 6
+ 6,
))
) {
$this->ajaxResponse['buttonName'] = str_replace('_qf_' . $this->getAttribute('id') . '_', '', $this->controller->getButtonName());
public function addCountry($id, $title, $required = NULL, $extra = NULL) {
$this->addElement('select', $id, $title,
array(
- '' => ts('- select -')
+ '' => ts('- select -'),
) + CRM_Core_PseudoConstant::country(), $extra
);
if ($required) {
$this->assign('selectable', $autoCompleteField['id_field']);
$this->addEntityRef($autoCompleteField['id_field'], NULL, array(
'placeholder' => $autoCompleteField['placeholder'],
- 'api' => $autoCompleteField['api']
+ 'api' => $autoCompleteField['api'],
));
CRM_Core_Resources::singleton()->addScriptFile('civicrm', 'js/AlternateContactSelector.js', 1, 'html-header')
'country',
'Country',
'state_province',
- 'StateProvince'
+ 'StateProvince',
), $elementName),
'data-callback' => strpos($elementName, 'rovince') ? 'civicrm/ajax/jqState' : 'civicrm/ajax/jqCounty',
'label' => strpos($elementName, 'rovince') ? ts('State/Province') : ts('County'),
$form->addDate('exclude_date', ts('Exclude Date(s)'), FALSE);
$select = $form->add('select', 'exclude_date_list', ts(''), self::$_excludeDateInfo, FALSE, array(
'style' => 'width:150px;',
- 'size' => 4
+ 'size' => 4,
));
$select->setMultiple(TRUE);
$form->addElement('button', 'add_to_exclude_list', '>>', 'onClick="addToExcludeList(document.getElementById(\'exclude_date\').value);"');
) {
call_user_func(array(
CRM_Core_BAO_RecurringEntity::$_recurringEntityHelper[$params['entity_table']]['helper_class'],
- call_user_func_array(CRM_Core_BAO_RecurringEntity::$_recurringEntityHelper[$params['entity_table']]['pre_delete_func'], array($params['entity_id']))
+ call_user_func_array(CRM_Core_BAO_RecurringEntity::$_recurringEntityHelper[$params['entity_table']]['pre_delete_func'], array($params['entity_id'])),
)
);
}
'value',
'label',
'weight',
- 'description'
+ 'description',
) as $fld) {
$row[$fld] = $dao->$fld;
}
foreach ($addressOptions as $element => $isSet) {
if ($isSet && (!in_array($element, array(
'im',
- 'openid'
+ 'openid',
)))
) {
if (in_array($element, array(
'country',
'state_province',
- 'county'
+ 'county',
))) {
$element .= '_id';
}
$result[str_replace(array(
'][',
'[',
- "]"
+ "]",
), array('_', '_', ''), $fld)] = $value;
}
}
foreach (array(
'email',
'phone_type_id',
- 'phone'
+ 'phone',
) as $element) {
$block = ($element == 'phone_type_id') ? 'phone' : $element;
for ($i = 1; $i < 3; $i++) {
$result[str_replace(array(
'][',
'[',
- "]"
+ "]",
), array('_', '_', ''), $fld)] = $value;
}
}
//CRM-15546
$contributionStatuses = CRM_Core_PseudoConstant::get('CRM_Contribute_DAO_Contribution', 'contribution_status_id', array(
'labelColumn' => 'name',
- 'flip' => 1
+ 'flip' => 1,
));
$contribution->receive_date = CRM_Utils_Date::isoToMysql($contribution->receive_date);
$contribution->receipt_date = CRM_Utils_Date::isoToMysql($contribution->receipt_date);
// if transaction is failed then set "Cancelled" as membership status
$membershipStatuses = CRM_Core_PseudoConstant::get('CRM_Member_DAO_Membership', 'status_id', array(
'labelColumn' => 'name',
- 'flip' => 1
+ 'flip' => 1,
));
foreach ($memberships as $membership) {
if ($membership) {
if ($participant) {
$participantStatuses = CRM_Core_PseudoConstant::get('CRM_Event_DAO_Participant', 'status_id', array(
'labelColumn' => 'name',
- 'flip' => 1
+ 'flip' => 1,
));
$participant->status_id = $participantStatuses['Cancelled'];
$participant->save();
}
$contributionStatuses = CRM_Core_PseudoConstant::get('CRM_Contribute_DAO_Contribution', 'contribution_status_id', array(
'labelColumn' => 'name',
- 'flip' => 1
+ 'flip' => 1,
));
$contribution->contribution_status_id = $contributionStatuses['Cancelled'];
$contribution->cancel_date = self::$_now;
if (!empty($memberships)) {
$membershipStatuses = CRM_Core_PseudoConstant::get('CRM_Member_DAO_Membership', 'status_id', array(
'labelColumn' => 'name',
- 'flip' => 1
+ 'flip' => 1,
));
foreach ($memberships as $membership) {
if ($membership) {
if ($participant) {
$participantStatuses = CRM_Core_PseudoConstant::get('CRM_Event_DAO_Participant', 'status_id', array(
'labelColumn' => 'name',
- 'flip' => 1
+ 'flip' => 1,
));
$participant->status_id = $participantStatuses['Cancelled'];
$participant->save();
if (empty($input['skipComponentSync'])) {
$participantStatuses = CRM_Core_PseudoConstant::get('CRM_Event_DAO_Participant', 'status_id', array(
'labelColumn' => 'name',
- 'flip' => 1
+ 'flip' => 1,
));
$participant->status_id = $participantStatuses['Registered'];
}
}
$contributionStatuses = CRM_Core_PseudoConstant::get('CRM_Contribute_DAO_Contribution', 'contribution_status_id', array(
'labelColumn' => 'name',
- 'flip' => 1
+ 'flip' => 1,
));
$contribution->contribution_status_id = $contributionStatuses['Completed'];
$contribution->is_test = $input['is_test'];
if ($contribution->id) {
$contributionStatuses = CRM_Core_PseudoConstant::get('CRM_Contribute_DAO_Contribution', 'contribution_status_id', array(
'labelColumn' => 'name',
- 'flip' => 1
+ 'flip' => 1,
));
if ((empty($input['prevContribution']) && $paymentProcessorId) || (!$input['prevContribution']->is_pay_later && $input['prevContribution']->contribution_status_id == $contributionStatuses['Pending'])) {
$input['payment_processor'] = $paymentProcessorId;
$contributionStatuses = CRM_Core_PseudoConstant::get('CRM_Contribute_DAO_Contribution', 'contribution_status_id', array(
'labelColumn' => 'name',
- 'flip' => 1
+ 'flip' => 1,
));
$input['skipComponentSync'] = CRM_Utils_Array::value('skipComponentSync', $params);
if ($statusId == $contributionStatuses['Cancelled']) {
foreach (array(
'fee_amount',
'check_number',
- 'payment_instrument_id'
+ 'payment_instrument_id',
) as $field) {
if (!$input[$field] = CRM_Utils_Array::value($field, $params)) {
$input[$field] = $contribution->$field;
try {
civicrm_api3('membership_payment', 'create', array(
'membership_id' => $value['entity_id'],
- 'contribution_id' => $contribution->id
+ 'contribution_id' => $contribution->id,
));
}
catch (CiviCRM_API3_Exception $e) {
foreach (array(
'target',
- 'assignee'
+ 'assignee',
) as $role) {
$contact = array();
if (!empty($activity[$role . '_contact_id'])) {
ts('Bounce type(s)'),
CRM_Core_PseudoConstant::get('CRM_Mailing_Event_DAO_Bounce', 'bounce_type_id', array(
'keyColumn' => 'id',
- 'labelColumn' => 'name'
+ 'labelColumn' => 'name',
))
);
return;
if (in_array($row['status'], array(
'Scheduled',
'Running',
- 'Paused'
+ 'Paused',
))) {
if ($allAccess ||
($showApprovalLinks && $showCreateLinks && $showScheduleLinks)
'id',
'auto_renew',
'duration_unit',
- 'duration_interval'
+ 'duration_interval',
) as $fld) {
$this->_recurMembershipTypes[$recurMembershipTypes->id][$fld] = $recurMembershipTypes->$fld;
}
if (in_array(CRM_Utils_Array::value('auto_renew', $params), array(
1,
- 2
+ 2,
))) {
if (($params['duration_interval'] > 1 && $params['duration_unit'] == 'year') ||
($params['duration_interval'] > 12 && $params['duration_unit'] == 'month')
$labelRows = array();
$memberships = civicrm_api3('membership', 'get', array(
'id' => array('IN' => $this->_memberIds),
- 'return' => 'contact_id'
+ 'return' => 'contact_id',
));
foreach ($memberships['values'] as $id => $membership) {
$labelRows[$id] = $rows[$membership['contact_id']];
$this->setMaxFileSize($uploadFileSize);
$this->addRule('uploadFile', ts('File size should be less than %1 MBytes (%2 bytes)', array(
1 => $uploadSize,
- 2 => $uploadFileSize
+ 2 => $uploadFileSize,
)), 'maxfilesize', $uploadFileSize);
$this->addRule('uploadFile', ts('A valid file must be uploaded.'), 'uploadedfile');
$this->addRule('uploadFile', ts('Input file must be in CSV format'), 'utf8File');
'downloadDuplicateRecordsUrl',
'downloadMismatchRecordsUrl',
'groupAdditions',
- 'unMatchCount'
+ 'unMatchCount',
);
foreach ($properties as $property) {
$this->assign($property, $this->get($property));
$this->add('text', 'eachPaymentAmount', ts('each'), array(
'size' => 10,
'style' => "background-color:#EBECE4",
- 'READONLY'
+ 'READONLY',
));
//add various dates
array(
'title' => ts('Price Fields'),
'url' => CRM_Utils_System::url('civicrm/admin/price/field', 'reset=1&sid=' . $this->_sid),
- )
+ ),
);
CRM_Utils_System::appendBreadCrumb($breadcrumb);
asort($this->activityTypes);
$this->_columns = array(
- 'civicrm_contact' => array(
- 'dao' => 'CRM_Contact_DAO_Contact',
- 'fields' => array(
- 'contact_source' => array(
- 'name' => 'sort_name',
- 'title' => ts('Source Contact Name'),
- 'alias' => 'civicrm_contact_source',
- 'no_repeat' => TRUE,
- ),
- 'contact_assignee' => array(
- 'name' => 'sort_name',
- 'title' => ts('Assignee Contact Name'),
- 'alias' => 'civicrm_contact_assignee',
- 'dbAlias' => "civicrm_contact_assignee.sort_name",
- 'default' => TRUE,
- ),
- 'contact_target' => array(
- 'name' => 'sort_name',
- 'title' => ts('Target Contact Name'),
- 'alias' => 'civicrm_contact_target',
- 'dbAlias' => "civicrm_contact_target.sort_name",
- 'default' => TRUE,
- ),
- 'contact_source_id' => array(
- 'name' => 'id',
- 'alias' => 'civicrm_contact_source',
- 'dbAlias' => "civicrm_contact_source.id",
- 'no_display' => TRUE,
- 'default' => TRUE,
- 'required' => TRUE,
- ),
- 'contact_assignee_id' => array(
- 'name' => 'id',
- 'alias' => 'civicrm_contact_assignee',
- 'dbAlias' => "civicrm_contact_assignee.id",
- 'no_display' => TRUE,
- 'default' => TRUE,
- 'required' => TRUE,
- ),
- 'contact_target_id' => array(
- 'name' => 'id',
- 'alias' => 'civicrm_contact_target',
- 'dbAlias' => "civicrm_contact_target.id",
- 'no_display' => TRUE,
- 'default' => TRUE,
- 'required' => TRUE,
- ),
+ 'civicrm_contact' => array(
+ 'dao' => 'CRM_Contact_DAO_Contact',
+ 'fields' => array(
+ 'contact_source' => array(
+ 'name' => 'sort_name',
+ 'title' => ts('Source Contact Name'),
+ 'alias' => 'civicrm_contact_source',
+ 'no_repeat' => TRUE,
),
- 'filters' => array(
- 'contact_source' => array(
- 'name' => 'sort_name',
- 'alias' => 'civicrm_contact_source',
- 'title' => ts('Source Contact Name'),
- 'operator' => 'like',
- 'type' => CRM_Report_Form::OP_STRING,
- ),
- 'contact_assignee' => array(
- 'name' => 'sort_name',
- 'alias' => 'civicrm_contact_assignee',
- 'title' => ts('Assignee Contact Name'),
- 'operator' => 'like',
- 'type' => CRM_Report_Form::OP_STRING,
- ),
- 'contact_target' => array(
- 'name' => 'sort_name',
- 'alias' => 'civicrm_contact_target',
- 'title' => ts('Target Contact Name'),
- 'operator' => 'like',
- 'type' => CRM_Report_Form::OP_STRING,
- ),
- 'current_user' => array(
- 'name' => 'current_user',
- 'title' => ts('Limit To Current User'),
- 'type' => CRM_Utils_Type::T_INT,
- 'operatorType' => CRM_Report_Form::OP_SELECT,
- 'options' => array('0' => ts('No'), '1' => ts('Yes')),
- ),
+ 'contact_assignee' => array(
+ 'name' => 'sort_name',
+ 'title' => ts('Assignee Contact Name'),
+ 'alias' => 'civicrm_contact_assignee',
+ 'dbAlias' => "civicrm_contact_assignee.sort_name",
+ 'default' => TRUE,
+ ),
+ 'contact_target' => array(
+ 'name' => 'sort_name',
+ 'title' => ts('Target Contact Name'),
+ 'alias' => 'civicrm_contact_target',
+ 'dbAlias' => "civicrm_contact_target.sort_name",
+ 'default' => TRUE,
+ ),
+ 'contact_source_id' => array(
+ 'name' => 'id',
+ 'alias' => 'civicrm_contact_source',
+ 'dbAlias' => "civicrm_contact_source.id",
+ 'no_display' => TRUE,
+ 'default' => TRUE,
+ 'required' => TRUE,
+ ),
+ 'contact_assignee_id' => array(
+ 'name' => 'id',
+ 'alias' => 'civicrm_contact_assignee',
+ 'dbAlias' => "civicrm_contact_assignee.id",
+ 'no_display' => TRUE,
+ 'default' => TRUE,
+ 'required' => TRUE,
+ ),
+ 'contact_target_id' => array(
+ 'name' => 'id',
+ 'alias' => 'civicrm_contact_target',
+ 'dbAlias' => "civicrm_contact_target.id",
+ 'no_display' => TRUE,
+ 'default' => TRUE,
+ 'required' => TRUE,
),
- 'grouping' => 'contact-fields',
),
- 'civicrm_email' => array(
- 'dao' => 'CRM_Core_DAO_Email',
- 'fields' => array(
- 'contact_source_email' => array(
- 'name' => 'email',
- 'title' => ts('Source Contact Email'),
- 'alias' => 'civicrm_email_source',
- ),
- 'contact_assignee_email' => array(
- 'name' => 'email',
- 'title' => ts('Assignee Contact Email'),
- 'alias' => 'civicrm_email_assignee',
- ),
- 'contact_target_email' => array(
- 'name' => 'email',
- 'title' => ts('Target Contact Email'),
- 'alias' => 'civicrm_email_target',
- ),
+ 'filters' => array(
+ 'contact_source' => array(
+ 'name' => 'sort_name',
+ 'alias' => 'civicrm_contact_source',
+ 'title' => ts('Source Contact Name'),
+ 'operator' => 'like',
+ 'type' => CRM_Report_Form::OP_STRING,
),
- 'order_bys' => array(
- 'source_contact_email' => array(
- 'name' => 'email',
- 'title' => ts('Source Contact Email'),
- 'dbAlias' => 'civicrm_email_contact_source_email',
- ),
+ 'contact_assignee' => array(
+ 'name' => 'sort_name',
+ 'alias' => 'civicrm_contact_assignee',
+ 'title' => ts('Assignee Contact Name'),
+ 'operator' => 'like',
+ 'type' => CRM_Report_Form::OP_STRING,
+ ),
+ 'contact_target' => array(
+ 'name' => 'sort_name',
+ 'alias' => 'civicrm_contact_target',
+ 'title' => ts('Target Contact Name'),
+ 'operator' => 'like',
+ 'type' => CRM_Report_Form::OP_STRING,
+ ),
+ 'current_user' => array(
+ 'name' => 'current_user',
+ 'title' => ts('Limit To Current User'),
+ 'type' => CRM_Utils_Type::T_INT,
+ 'operatorType' => CRM_Report_Form::OP_SELECT,
+ 'options' => array('0' => ts('No'), '1' => ts('Yes')),
),
),
- 'civicrm_activity' => array(
- 'dao' => 'CRM_Activity_DAO_Activity',
- 'fields' => array(
- 'id' => array(
- 'no_display' => TRUE,
- 'title' => ts('Activity ID'),
- 'required' => TRUE,
- ),
- 'source_record_id' => array(
- 'no_display' => TRUE,
- 'required' => TRUE,
- ),
- 'activity_type_id' => array(
- 'title' => ts('Activity Type'),
- 'required' => TRUE,
- 'type' => CRM_Utils_Type::T_STRING,
- ),
- 'activity_subject' => array(
- 'title' => ts('Subject'),
- 'default' => TRUE,
- ),
- 'activity_date_time' => array(
- 'title' => ts('Activity Date'),
- 'required' => TRUE,
- ),
- 'status_id' => array(
- 'title' => ts('Activity Status'),
- 'default' => TRUE,
- 'type' => CRM_Utils_Type::T_STRING,
- ),
- 'duration' => array(
- 'title' => ts('Duration'),
- 'type' => CRM_Utils_Type::T_INT,
- ),
- 'details' => array(
- 'title' => ts('Activity Details'),
- ),
+ 'grouping' => 'contact-fields',
+ ),
+ 'civicrm_email' => array(
+ 'dao' => 'CRM_Core_DAO_Email',
+ 'fields' => array(
+ 'contact_source_email' => array(
+ 'name' => 'email',
+ 'title' => ts('Source Contact Email'),
+ 'alias' => 'civicrm_email_source',
),
- 'filters' => array(
- 'activity_date_time' => array(
- 'default' => 'this.month',
- 'operatorType' => CRM_Report_Form::OP_DATE,
- ),
- 'activity_subject' => array('title' => ts('Activity Subject')),
- 'activity_type_id' => array(
- 'title' => ts('Activity Type'),
- 'operatorType' => CRM_Report_Form::OP_MULTISELECT,
- 'options' => $this->activityTypes,
- ),
- 'status_id' => array(
- 'title' => ts('Activity Status'),
- 'operatorType' => CRM_Report_Form::OP_MULTISELECT,
- 'options' => CRM_Core_PseudoConstant::activityStatus(),
- ),
- 'details' => array(
- 'title' => ts('Activity Details'),
- 'type' => CRM_Utils_Type::T_TEXT,
- ),
+ 'contact_assignee_email' => array(
+ 'name' => 'email',
+ 'title' => ts('Assignee Contact Email'),
+ 'alias' => 'civicrm_email_assignee',
),
- 'order_bys' => array(
- 'activity_date_time' => array(
- 'title' => ts('Activity Date'),
- 'default_weight' => '1',
- 'dbAlias' => 'civicrm_activity_activity_date_time',
- ),
- 'activity_type_id' => array(
- 'title' => ts('Activity Type'),
- 'default_weight' => '2',
- 'dbAlias' => "option_value_civireport",
- ),
+ 'contact_target_email' => array(
+ 'name' => 'email',
+ 'title' => ts('Target Contact Email'),
+ 'alias' => 'civicrm_email_target',
),
- 'grouping' => 'activity-fields',
- 'alias' => 'activity',
),
- 'civicrm_activity_contact' => array(
- 'dao' => 'CRM_Activity_DAO_ActivityContact',
- 'fields' => array(// so we have $this->_alias populated
+ 'order_bys' => array(
+ 'source_contact_email' => array(
+ 'name' => 'email',
+ 'title' => ts('Source Contact Email'),
+ 'dbAlias' => 'civicrm_email_contact_source_email',
),
),
- 'civicrm_option_value' => array(
- 'dao' => 'CRM_Core_DAO_OptionValue',
- 'fields' => array(// so we have $this->_alias populated
+ ),
+ 'civicrm_activity' => array(
+ 'dao' => 'CRM_Activity_DAO_Activity',
+ 'fields' => array(
+ 'id' => array(
+ 'no_display' => TRUE,
+ 'title' => ts('Activity ID'),
+ 'required' => TRUE,
+ ),
+ 'source_record_id' => array(
+ 'no_display' => TRUE,
+ 'required' => TRUE,
+ ),
+ 'activity_type_id' => array(
+ 'title' => ts('Activity Type'),
+ 'required' => TRUE,
+ 'type' => CRM_Utils_Type::T_STRING,
+ ),
+ 'activity_subject' => array(
+ 'title' => ts('Subject'),
+ 'default' => TRUE,
+ ),
+ 'activity_date_time' => array(
+ 'title' => ts('Activity Date'),
+ 'required' => TRUE,
+ ),
+ 'status_id' => array(
+ 'title' => ts('Activity Status'),
+ 'default' => TRUE,
+ 'type' => CRM_Utils_Type::T_STRING,
+ ),
+ 'duration' => array(
+ 'title' => ts('Duration'),
+ 'type' => CRM_Utils_Type::T_INT,
),
- 'status_id' =>
- array(
- 'title' => ts('Activity Status'),
- 'default' => TRUE,
- 'type' => CRM_Utils_Type::T_STRING,
- ),
- 'duration' =>
- array(
- 'title' => ts('Duration'),
- 'type' => CRM_Utils_Type::T_INT,
- ),
- 'location' =>
- array(
- 'title' => ts('Location'),
- 'type' => CRM_Utils_Type::T_STRING,
- ),
'details' => array(
'title' => ts('Activity Details'),
- )
+ ),
),
'filters' => array(
'activity_date_time' => array(
'default' => 'this.month',
'operatorType' => CRM_Report_Form::OP_DATE,
),
- 'activity_subject' =>
- array('title' => ts('Activity Subject')),
- 'location' =>
- array(
- 'title' => ts('Location'),
- 'type' => CRM_Utils_Type::T_TEXT,
- ),
- 'activity_type_id' =>
- array(
- 'title' => ts('Activity Type'),
- 'operatorType' => CRM_Report_Form::OP_MULTISELECT,
- 'options' => $this->activityTypes,
- ),
- 'status_id' =>
- array(
- 'title' => ts('Activity Status'),
- 'operatorType' => CRM_Report_Form::OP_MULTISELECT,
- 'options' => CRM_Core_PseudoConstant::activityStatus(),
- ),
+ 'activity_subject' => array('title' => ts('Activity Subject')),
+ 'activity_type_id' => array(
+ 'title' => ts('Activity Type'),
+ 'operatorType' => CRM_Report_Form::OP_MULTISELECT,
+ 'options' => $this->activityTypes,
+ ),
+ 'status_id' => array(
+ 'title' => ts('Activity Status'),
+ 'operatorType' => CRM_Report_Form::OP_MULTISELECT,
+ 'options' => CRM_Core_PseudoConstant::activityStatus(),
+ ),
'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',
+ ),
+ 'activity_type_id' => array(
+ 'title' => ts('Activity Type'),
+ 'default_weight' => '2',
+ 'dbAlias' => "option_value_civireport",
+ ),
+ ),
+ 'grouping' => 'activity-fields',
+ 'alias' => 'activity',
+ ),
+ 'civicrm_activity_contact' => array(
+ 'dao' => 'CRM_Activity_DAO_ActivityContact',
+ 'fields' => array(// so we have $this->_alias populated
+ ),
+ ),
+ 'civicrm_option_value' => array(
+ 'dao' => 'CRM_Core_DAO_OptionValue',
+ 'fields' => array(// so we have $this->_alias populated
+ ),
+ 'status_id' =>
+ array(
+ 'title' => ts('Activity Status'),
+ 'default' => TRUE,
+ 'type' => CRM_Utils_Type::T_STRING,
+ ),
+ 'duration' =>
+ array(
+ 'title' => ts('Duration'),
+ 'type' => CRM_Utils_Type::T_INT,
+ ),
+ 'location' =>
+ array(
+ 'title' => ts('Location'),
+ 'type' => CRM_Utils_Type::T_STRING,
+ ),
+ 'details' => array(
+ 'title' => ts('Activity Details'),
+ ),
+ ),
+ 'filters' => array(
+ 'activity_date_time' => array(
+ 'default' => 'this.month',
+ 'operatorType' => CRM_Report_Form::OP_DATE,
+ ),
+ 'activity_subject' =>
+ array('title' => ts('Activity Subject')),
+ 'location' =>
+ array(
+ 'title' => ts('Location'),
+ 'type' => CRM_Utils_Type::T_TEXT,
+ ),
+ 'activity_type_id' =>
+ array(
+ 'title' => ts('Activity Type'),
+ 'operatorType' => CRM_Report_Form::OP_MULTISELECT,
+ 'options' => $this->activityTypes,
+ ),
+ 'status_id' =>
+ array(
+ 'title' => ts('Activity Status'),
+ 'operatorType' => CRM_Report_Form::OP_MULTISELECT,
+ 'options' => CRM_Core_PseudoConstant::activityStatus(),
+ ),
+ 'details' => array(
+ 'title' => ts('Activity Details'),
+ 'type' => CRM_Utils_Type::T_TEXT,
),
- ) + $this->addressFields(TRUE);
+ ),
+ ) + $this->addressFields(TRUE);
if ($campaignEnabled) {
// Add display column and filter for Survey Results, Campaign and Engagement Index if CiviCampaign is enabled
1 => array(
'location_type_id' => $phoneloc,
'email' => $stripFrom . '@mobile.sms',
- )
+ ),
),
'phone' => array(
1 => array(
'phone_type_id' => $phonetype,
'location_type_id' => $phoneloc,
'phone' => $stripFrom,
- )
+ ),
),
);
$fromContact = CRM_Contact_BAO_Contact::create($contactparams, FALSE, TRUE, FALSE);
$form->addElement('text', 'cancel_URL', ts('Cancel Redirect URL'), CRM_Core_DAO::getAttribute('CRM_Core_DAO_UFGroup', 'cancel_URL'));
// add select for groups
- $group = array(
- '' => ts('- select -')
- ) + $form->_group;
+ $group = array('' => ts('- select -')) + $form->_group;
$form->_groupElement = &$form->addElement('select', 'group', ts('Limit listings to a specific Group?'), $group);
//add notify field
array(
'title' => ts('CiviCRM Profile Fields'),
'url' => $url,
- )
+ ),
);
CRM_Utils_System::appendBreadCrumb($breadCrumb);
}
$defaultLocation = $this->_location_types[$defaultLocationType->id];
unset($this->_location_types[$defaultLocationType->id]);
$this->_location_types = array(
- $defaultLocationType->id => $defaultLocation,
- ) + $this->_location_types;
+ $defaultLocationType->id => $defaultLocation,
+ ) + $this->_location_types;
}
$this->_location_types = array('Primary') + $this->_location_types;
$endId = $startId + self::BATCH_SIZE - 1;
$title = ts("Upgrade DB to 4.5.beta9: Fix line items for {$label} (%1 => %2)", array(
1 => $startId,
- 2 => $endId
+ 2 => $endId,
));
$this->addTask($title, 'task_4_5_0_fixLineItem', $startId, $endId, $label);
}
"Start Date",
"End Date",
"Membership Status",
- "Action"
+ "Action",
);
$template->assign('columnHeaders', $columnHeaders);
$template->assign('rows', $rows);
$postMessage = ts('You can <a href="%1">click here</a> to try running the 4.2 upgrade script again. <a href="%2" target="_blank">(Review upgrade documentation)</a>',
array(
1 => CRM_Utils_System::url('civicrm/upgrade', 'reset=1'),
- 2 => 'http://wiki.civicrm.org/confluence/display/CRMDOC/Installation+and+Upgrades'
+ 2 => 'http://wiki.civicrm.org/confluence/display/CRMDOC/Installation+and+Upgrades',
));
$template->assign('postMessage', $postMessage);
'W',
'X',
'Y',
- 'Z'
+ 'Z',
);
return $staticAlphabets;
}
'civicrm_loc_block',
'civicrm_email',
'civicrm_phone',
- 'civicrm_im'
+ 'civicrm_im',
));
}
$mut->checkMailLog(array(
'Thank you for your participation',
'Annual CiviCRM meet',
- 'Mr. Anthony Anderson II'
+ 'Mr. Anthony Anderson II',
)
);
$mut->stop();
'fruit' => array(
'yours' => 'orange',
'mine' => 'new apple',
- 'ours' => 'banana'
- )
- )
- )
+ 'ours' => 'banana',
+ ),
+ ),
+ ),
),
$this->res->getSettings()
);
'test.whiz',
'test.whizbang',
'test.foo',
- 'test.foo.bar'
+ 'test.foo.bar',
), $c->getKeys());
}
$this->callAPISuccess('group_contact', 'create', array(
'contact_id' => $contactID,
'group_id' => $groupID,
- 'status' => 'Added'
+ 'status' => 'Added',
));
}
}
'CustomSearch',
'Extension',
'ReportTemplate',
- 'System'
+ 'System',
);
if ($sequential === TRUE) {
return $entitiesWithoutGet;
'PaymentProcessor',
'Setting',
'MailingContact',
- 'SystemLog'
+ 'SystemLog',
//skip this because it doesn't make sense to update logs,
);
if ($sequential === TRUE) {
'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',
if (isset($specs['pseudoconstant']['optionGroupName'])) {
$optionGroupID = $this->callAPISuccess('option_group', 'getvalue', array(
'name' => 'pdf_format',
- 'return' => 'id'
+ 'return' => 'id',
));
$optionValue = $this->callAPISuccess('option_value', 'create', array(
'option_group_id' => $optionGroupID,
- 'label' => 'new option value'
+ 'label' => 'new option value',
));
$options['values'][] = $optionValue['id'];
}
'update-result' => $update,
'getsingle-params' => $checkParams,
'getsingle-result' => $checkEntity,
- 'expected entity' => $entity
+ 'expected entity' => $entity,
), TRUE));
if ($resetFKTo) {
//reset the foreign key fields because otherwise our cleanup routine fails & some other unexpected stuff can kick in
$result = $this->callAPIAndDocument($this->_entity, 'get', array(
'options' => array(
'metadata' => array('fields'),
- )
+ ),
), __FUNCTION__, __FILE__, 'Demonostrates returning field metadata', 'GetWithMetadata');
$this->assertEquals('Website', $result['metadata']['fields']['url']['title']);
}