Exemplo n.º 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 => ts('Delete Pledges'), 3 => ts('Export Pledges'));
         //CRM-4418, check for delete
         if (!CRM_Core_Permission::check('delete in CiviPledge')) {
             unset(self::$_tasks[1]);
         }
     }
     asort(self::$_tasks);
     return self::$_tasks;
 }
Exemplo n.º 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 Pledges'), 'class' => 'CRM_Pledge_Form_Task_Delete', 'result' => FALSE), 2 => array('title' => ts('Print Pledges'), 'class' => 'CRM_Pledge_Form_Task_Print', 'result' => FALSE), 3 => array('title' => ts('Export Pledges'), 'class' => array('CRM_Export_Form_Select', 'CRM_Export_Form_Map'), 'result' => FALSE));
         //CRM-4418, check for delete
         if (!CRM_Core_Permission::check('delete in CiviPledge')) {
             unset(self::$_tasks[1]);
         }
     }
     CRM_Utils_Hook::searchTasks('pledge', self::$_tasks);
     asort(self::$_tasks);
     return self::$_tasks;
 }