/** * 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) { if (CRM_Core_Permission::checkActionPermission('CiviGrant', CRM_Core_Action::DELETE)) { self::$_tasks = array(1 => ts('Delete Grants')); } } 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 => ts('Delete Grants'), 3 => ts('Export Grants')); } if (!CRM_Core_Permission::check('delete in CiviGrant')) { unset(self::$_tasks[1]); } 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 Grants'), 'class' => 'CRM_Grant_Form_Task_Delete', 'result' => FALSE), 2 => array('title' => ts('Print Grants'), 'class' => 'CRM_Grant_Form_Task_Print', 'result' => FALSE), 3 => array('title' => ts('Export Grants'), 'class' => array('CRM_Export_Form_Select', 'CRM_Export_Form_Map'), 'result' => FALSE), 4 => array('title' => ts('Update Grants'), 'class' => 'CRM_Grant_Form_Task_Update', 'result' => FALSE)); } if (!CRM_Core_Permission::check('delete in CiviGrant')) { unset(self::$_tasks[1]); } CRM_Utils_Hook::searchTasks('grant', self::$_tasks); asort(self::$_tasks); return self::$_tasks; }