Пример #1
0
 /**
  * These tasks are the core set of tasks that the user can perform
  * on a contact / group of contacts
  *
  * @return array the set of tasks for a group of contacts
  * @static
  * @access public
  */
 static function &tasks()
 {
     if (!self::$_tasks) {
         self::$_tasks = array(1 => array('title' => ts('Delete Activities'), 'class' => 'CRM_Activity_Form_Task_Delete', 'result' => false), 2 => array('title' => ts('Print Activities'), 'class' => 'CRM_Activity_Form_Task_Print', 'result' => false), 3 => array('title' => ts('Export Activities'), 'class' => array('CRM_Export_Form_Select', 'CRM_Export_Form_Map'), 'result' => false), 4 => array('title' => ts('Batch Update Activities Via Profile'), 'class' => array('CRM_Activity_Form_Task_PickProfile', 'CRM_Activity_Form_Task_Batch'), 'result' => false), 5 => array('title' => ts('Send Email to Contacts'), 'class' => array('CRM_Activity_Form_Task_PickOption', 'CRM_Activity_Form_Task_Email'), 'result' => false));
         //CRM-4418, check for delete
         if (!CRM_Core_Permission::check('delete activities')) {
             unset(self::$_tasks[1]);
         }
     }
     require_once 'CRM/Utils/Hook.php';
     CRM_Utils_Hook::searchTasks('activity', self::$_tasks);
     asort(self::$_tasks);
     return self::$_tasks;
 }
Пример #2
0
 /**
  * These tasks are the core set of tasks that the user can perform
  * on a contact / group of contacts
  *
  * @return array the set of tasks for a group of contacts
  * @static
  * @access public
  */
 static function &tasks()
 {
     if (!self::$_tasks) {
         self::$_tasks = array(1 => array('title' => ts('Delete Activities'), 'class' => 'CRM_Activity_Form_Task_Delete', 'result' => FALSE), 2 => array('title' => ts('Print Activities'), 'class' => 'CRM_Activity_Form_Task_Print', 'result' => FALSE), 3 => array('title' => ts('Export Activities'), 'class' => array('CRM_Export_Form_Select', 'CRM_Export_Form_Map'), 'result' => FALSE), 4 => array('title' => ts('Batch Update Activities Via Profile'), 'class' => array('CRM_Activity_Form_Task_PickProfile', 'CRM_Activity_Form_Task_Batch'), 'result' => FALSE), 5 => array('title' => ts('Send Email to Contacts'), 'class' => array('CRM_Activity_Form_Task_PickOption', 'CRM_Activity_Form_Task_Email'), 'result' => FALSE), 6 => array('title' => ts('Send Reply SMS To Contacts'), 'class' => 'CRM_Activity_Form_Task_SMS', 'result' => FALSE));
         $config = CRM_Core_Config::singleton();
         if (in_array('CiviCase', $config->enableComponents)) {
             self::$_tasks[6] = array('title' => ts('File on Case'), 'class' => 'CRM_Activity_Form_Task_FileOnCase', 'result' => FALSE);
         }
         //CRM-4418, check for delete
         if (!CRM_Core_Permission::check('delete activities')) {
             unset(self::$_tasks[1]);
         }
     }
     CRM_Utils_Hook::searchTasks('activity', self::$_tasks);
     asort(self::$_tasks);
     return self::$_tasks;
 }
Пример #3
0
 /**
  * These tasks are the core set of tasks that the user can perform
  * on a contact / group of contacts.
  *
  * @return array
  *   the set of tasks for a group of contacts
  */
 public static function &tasks()
 {
     if (!self::$_tasks) {
         self::$_tasks = array(1 => array('title' => ts('Delete activities'), 'class' => 'CRM_Activity_Form_Task_Delete', 'result' => FALSE), 2 => array('title' => ts('Print selected rows'), 'class' => 'CRM_Activity_Form_Task_Print', 'result' => FALSE), 3 => array('title' => ts('Export activities'), 'class' => array('CRM_Export_Form_Select', 'CRM_Export_Form_Map'), 'result' => FALSE), 4 => array('title' => ts('Update multiple activities'), 'class' => array('CRM_Activity_Form_Task_PickProfile', 'CRM_Activity_Form_Task_Batch'), 'result' => FALSE), 5 => array('title' => ts('Email - send now'), 'class' => array('CRM_Activity_Form_Task_PickOption', 'CRM_Activity_Form_Task_Email'), 'result' => FALSE), 6 => array('title' => ts('SMS - send reply'), 'class' => 'CRM_Activity_Form_Task_SMS', 'result' => FALSE), 7 => array('title' => ts('Tag - add to activities'), 'class' => 'CRM_Activity_Form_Task_AddToTag', 'result' => FALSE), 8 => array('title' => ts('Tag - remove from activities'), 'class' => 'CRM_Activity_Form_Task_RemoveFromTag', 'result' => FALSE));
         $config = CRM_Core_Config::singleton();
         if (in_array('CiviCase', $config->enableComponents)) {
             if (CRM_Core_Permission::check('access all cases and activities') || CRM_Core_Permission::check('access my cases and activities')) {
                 self::$_tasks[6] = array('title' => ts('File on case'), 'class' => 'CRM_Activity_Form_Task_FileOnCase', 'result' => FALSE);
             }
         }
         // CRM-4418, check for delete
         if (!CRM_Core_Permission::check('delete activities')) {
             unset(self::$_tasks[1]);
         }
     }
     CRM_Utils_Hook::searchTasks('activity', self::$_tasks);
     asort(self::$_tasks);
     return self::$_tasks;
 }