/** * 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 => ts('Delete Cases'), 3 => ts('Export Cases'), 4 => ts('Restore Cases')); //CRM-4418, check for delete if (!CRM_Core_Permission::check('delete in CiviCase')) { unset(self::$_tasks[1]); } } asort(self::$_tasks); return self::$_tasks; }
/** * 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 Cases'), 'class' => 'CRM_Case_Form_Task_Delete', 'result' => FALSE), 2 => array('title' => ts('Print Selected Rows'), 'class' => 'CRM_Case_Form_Task_Print', 'result' => FALSE), 3 => array('title' => ts('Export Cases'), 'class' => array('CRM_Export_Form_Select', 'CRM_Export_Form_Map'), 'result' => FALSE), 4 => array('title' => ts('Restore Cases'), 'class' => 'CRM_Case_Form_Task_Restore', 'result' => FALSE)); //CRM-4418, check for delete if (!CRM_Core_Permission::check('delete in CiviCase')) { unset(self::$_tasks[1]); } } CRM_Utils_Hook::searchTasks('case', self::$_tasks); asort(self::$_tasks); return self::$_tasks; }