예제 #1
0
파일: Task.php 프로젝트: bhirsch/voipdev
 /**
  * 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(3 => ts('Export Members'), 1 => ts('Delete Members'), 4 => ts('Send Email to Contacts'), 5 => ts('Batch Update Members Via Profile'));
         //CRM-4418, check for delete
         if (!CRM_Core_Permission::check('delete in CiviMember')) {
             unset(self::$_tasks[1]);
         }
     }
     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 Members'), 'class' => 'CRM_Member_Form_Task_Delete', 'result' => FALSE), 2 => array('title' => ts('Print Selected Rows'), 'class' => 'CRM_Member_Form_Task_Print', 'result' => FALSE), 3 => array('title' => ts('Export Members'), 'class' => array('CRM_Export_Form_Select', 'CRM_Export_Form_Map'), 'result' => FALSE), 4 => array('title' => ts('Send Email to Contacts'), 'class' => 'CRM_Member_Form_Task_Email', 'result' => TRUE), 5 => array('title' => ts('Batch Update Members Via Profile'), 'class' => array('CRM_Member_Form_Task_PickProfile', 'CRM_Member_Form_Task_Batch'), 'result' => TRUE), 6 => array('title' => ts('Mailing Labels'), 'class' => array('CRM_Member_Form_Task_Label'), 'result' => TRUE), 7 => array('title' => ts('Print PDF Letters for Memberships'), 'class' => 'CRM_Member_Form_Task_PDFLetter', 'result' => FALSE));
         //CRM-4418, check for delete
         if (!CRM_Core_Permission::check('delete in CiviMember')) {
             unset(self::$_tasks[1]);
         }
     }
     CRM_Utils_Hook::searchTasks('membership', 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
  * @static
  * @access public
  */
 static function &tasks()
 {
     if (!self::$_tasks) {
         self::$_tasks = array(1 => array('title' => ts('Delete Members'), 'class' => 'CRM_Member_Form_Task_Delete', 'result' => false), 2 => array('title' => ts('Print Memberships'), 'class' => 'CRM_Member_Form_Task_Print', 'result' => false), 3 => array('title' => ts('Export Members'), 'class' => array('CRM_Export_Form_Select', 'CRM_Export_Form_Map'), 'result' => false), 4 => array('title' => ts('Send Email to Contacts'), 'class' => 'CRM_Member_Form_Task_Email', 'result' => true), 5 => array('title' => ts('Batch Update Members Via Profile'), 'class' => array('CRM_Member_Form_Task_PickProfile', 'CRM_Member_Form_Task_Batch'), 'result' => true));
         //CRM-4418, check for delete
         if (!CRM_Core_Permission::check('delete in CiviMember')) {
             unset(self::$_tasks[1]);
         }
     }
     require_once 'CRM/Utils/Hook.php';
     CRM_Utils_Hook::searchTasks('membership', self::$_tasks);
     asort(self::$_tasks);
     return self::$_tasks;
 }
예제 #4
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 memberships'), 'class' => 'CRM_Member_Form_Task_Delete', 'result' => FALSE), 2 => array('title' => ts('Print selected rows'), 'class' => 'CRM_Member_Form_Task_Print', 'result' => FALSE), 3 => array('title' => ts('Export members'), 'class' => array('CRM_Export_Form_Select', 'CRM_Export_Form_Map'), 'result' => FALSE), 4 => array('title' => ts('Email - send now'), 'class' => 'CRM_Member_Form_Task_Email', 'result' => TRUE), 5 => array('title' => ts('Update multiple memberships'), 'class' => array('CRM_Member_Form_Task_PickProfile', 'CRM_Member_Form_Task_Batch'), 'result' => TRUE), 6 => array('title' => ts('Mailing labels - print'), 'class' => array('CRM_Member_Form_Task_Label'), 'result' => TRUE), 7 => array('title' => ts('PDF letters - print for memberships'), 'class' => 'CRM_Member_Form_Task_PDFLetter', 'result' => FALSE));
         //CRM-4418, check for delete
         if (!CRM_Core_Permission::check('delete in CiviMember')) {
             unset(self::$_tasks[1]);
         }
         //CRM-12920 - check for edit permission
         if (!CRM_Core_Permission::check('edit memberships')) {
             unset(self::$_tasks[5]);
         }
     }
     CRM_Utils_Hook::searchTasks('membership', self::$_tasks);
     asort(self::$_tasks);
     return self::$_tasks;
 }