static function initTasks() {
if (!self::$_tasks) {
self::$_tasks = array(
- 1 => array('title' => ts('Add Contacts to Group'),
+ 1 => array(
+ 'title' => ts('Add Contacts to Group'),
'class' => 'CRM_Contact_Form_Task_AddToGroup',
),
- 2 => array('title' => ts('Remove Contacts from Group'),
+ 2 => array(
+ 'title' => ts('Remove Contacts from Group'),
'class' => 'CRM_Contact_Form_Task_RemoveFromGroup',
),
- 3 => array('title' => ts('Tag Contacts (assign tags)'),
+ 3 => array(
+ 'title' => ts('Tag Contacts (assign tags)'),
'class' => 'CRM_Contact_Form_Task_AddToTag',
),
- 4 => array('title' => ts('Untag Contacts (remove tags)'),
+ 4 => array(
+ 'title' => ts('Untag Contacts (remove tags)'),
'class' => 'CRM_Contact_Form_Task_RemoveFromTag',
),
- 5 => array('title' => ts('Export Contacts'),
+ 5 => array(
+ 'title' => ts('Export Contacts'),
'class' => array(
'CRM_Export_Form_Select',
'CRM_Export_Form_Map',
),
'result' => FALSE,
),
- 6 => array('title' => ts('Send Email to Contacts'),
+ 6 => array(
+ 'title' => ts('Send Email to Contacts'),
'class' => 'CRM_Contact_Form_Task_Email',
'result' => TRUE,
),
- 7 => array('title' => ts('Send SMS to Contacts'),
+ 7 => array(
+ 'title' => ts('Send SMS to Contacts'),
'class' => 'CRM_Contact_Form_Task_SMS',
'result' => TRUE,
),
- 8 => array('title' => ts('Delete Contacts'),
+ 8 => array(
+ 'title' => ts('Delete Contacts'),
'class' => 'CRM_Contact_Form_Task_Delete',
'result' => FALSE,
),
- 11 => array('title' => ts('Record Activity for Contacts'),
+ 11 => array(
+ 'title' => ts('Record Activity for Contacts'),
'class' => 'CRM_Activity_Form_Activity',
),
- 13 => array('title' => ts('New Smart Group'),
+ 13 => array(
+ 'title' => ts('New Smart Group'),
'class' => 'CRM_Contact_Form_Task_SaveSearch',
'result' => TRUE,
),
- 14 => array('title' => ts('Update Smart Group'),
+ 14 => array(
+ 'title' => ts('Update Smart Group'),
'class' => 'CRM_Contact_Form_Task_SaveSearch_Update',
'result' => TRUE,
),
- 15 => array('title' => ts('Print Contacts'),
+ 15 => array(
+ 'title' => ts('Print Contacts'),
'class' => 'CRM_Contact_Form_Task_Print',
'result' => FALSE,
),
- 16 => array('title' => ts('Mailing Labels'),
+ 16 => array(
+ 'title' => ts('Mailing Labels'),
'class' => 'CRM_Contact_Form_Task_Label',
'result' => TRUE,
),
- 17 => array('title' => ts('Batch Update via Profile'),
+ 17 => array(
+ 'title' => ts('Batch Update via Profile'),
'class' => array(
'CRM_Contact_Form_Task_PickProfile',
'CRM_Contact_Form_Task_Batch',
),
'result' => TRUE,
),
- 19 => array('title' => ts('Print PDF Letter for Contacts'),
+ 19 => array(
+ 'title' => ts('Print PDF Letter for Contacts'),
'class' => 'CRM_Contact_Form_Task_PDF',
'result' => TRUE,
),
- 22 => array('title' => ts('Unhold Emails'),
+ 22 => array(
+ 'title' => ts('Unhold Emails'),
'class' => 'CRM_Contact_Form_Task_Unhold',
),
- 25 => array('title' => ts('Alter Contact Communication Preferences'),
+ 25 => array(
+ 'title' => ts('Alter Contact Communication Preferences'),
'class' => 'CRM_Contact_Form_Task_AlterPreferences',
),
self::RESTORE => array(
}
if (CRM_Core_Permission::check('merge duplicate contacts')) {
- self::$_tasks[21] = array('title' => ts('Merge Contacts'),
+ self::$_tasks[21] = array(
+ 'title' => ts('Merge Contacts'),
'class' => 'CRM_Contact_Form_Task_Merge',
'result' => TRUE,
);
)
)
) {
- self::$_tasks[12] = array('title' => ts('Map Contacts'),
+ self::$_tasks[12] = array(
+ 'title' => ts('Map Contacts'),
'class' => 'CRM_Contact_Form_Task_Map',
'result' => FALSE,
);
}
if (CRM_Core_Permission::access('CiviEvent')) {
- self::$_tasks[18] = array('title' => ts('Add Contacts to Event'),
+ self::$_tasks[18] = array(
+ 'title' => ts('Add Contacts to Event'),
'class' => 'CRM_Event_Form_Participant',
);
}
if (CRM_Core_Permission::access('CiviMail')) {
- self::$_tasks[20] = array('title' => ts('Schedule/Send a Mass Mailing'),
+ self::$_tasks[20] = array(
+ 'title' => ts('Schedule/Send a Mass Mailing'),
'class' => array(
'CRM_Mailing_Form_Group',
'CRM_Mailing_Form_Settings',
elseif (CRM_Mailing_Info::workflowEnabled() &&
CRM_Core_Permission::check('create mailings')
) {
- self::$_tasks[20] = array('title' => ts('Create a Mass Mailing'),
+ self::$_tasks[20] = array(
+ 'title' => ts('Create a Mass Mailing'),
'class' => array(
'CRM_Mailing_Form_Group',
'CRM_Mailing_Form_Settings',
* @return array set of tasks that are valid for the user
* @access public
*/
- static function &permissionedTaskTitles($permission, $deletedContacts = false) {
+ static function &permissionedTaskTitles($permission, $deletedContacts = FALSE) {
self::initTasks();
$tasks = array();
if ($deletedContacts) {
// make it the print task by default
$value = 15;
}
- return array(CRM_Utils_Array::value('class', self::$_tasks[$value]),
+ return array(
+ CRM_Utils_Array::value('class', self::$_tasks[$value]),
CRM_Utils_Array::value('result', self::$_tasks[$value]),
);
}