当前位置: 首页>>代码示例>>PHP>>正文


PHP CRM_Core_Component::taskList方法代码示例

本文整理汇总了PHP中CRM_Core_Component::taskList方法的典型用法代码示例。如果您正苦于以下问题:PHP CRM_Core_Component::taskList方法的具体用法?PHP CRM_Core_Component::taskList怎么用?PHP CRM_Core_Component::taskList使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在CRM_Core_Component的用法示例。


在下文中一共展示了CRM_Core_Component::taskList方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: initTasks

 static function initTasks()
 {
     if (!self::$_tasks) {
         self::$_tasks = array(1 => array('title' => ts('Add Contacts to Group'), 'class' => 'CRM_Contact_Form_Task_AddToGroup', 'result' => true), 2 => array('title' => ts('Remove Contacts from Group'), 'class' => 'CRM_Contact_Form_Task_RemoveFromGroup', 'result' => true), 3 => array('title' => ts('Tag Contacts (assign tags)'), 'class' => 'CRM_Contact_Form_Task_AddToTag', 'result' => true), 4 => array('title' => ts('Untag Contacts (remove tags)'), 'class' => 'CRM_Contact_Form_Task_RemoveFromTag', 'result' => true), 5 => array('title' => ts('Export Contacts'), 'class' => array('CRM_Export_Form_Select', 'CRM_Export_Form_Map'), 'result' => false), 6 => array('title' => ts('Send Email to Contacts'), 'class' => 'CRM_Contact_Form_Task_Email', 'result' => false), 7 => array('title' => ts('Send SMS to Contacts'), 'class' => 'CRM_Contact_Form_Task_SMS', 'result' => true), 8 => array('title' => ts('Delete Contacts'), 'class' => 'CRM_Contact_Form_Task_Delete', 'result' => false), 11 => array('title' => ts('Record Activity for Contacts'), 'class' => 'CRM_Activity_Form_Activity', 'result' => true), 13 => array('title' => ts('New Smart Group'), 'class' => 'CRM_Contact_Form_Task_SaveSearch', 'result' => true), 14 => array('title' => ts('Update Smart Group'), 'class' => 'CRM_Contact_Form_Task_SaveSearch_Update', 'result' => true), 15 => array('title' => ts('Print Contacts'), 'class' => 'CRM_Contact_Form_Task_Print', 'result' => false), 16 => array('title' => ts('Mailing Labels'), 'class' => 'CRM_Contact_Form_Task_Label', 'result' => true), 17 => array('title' => ts('Batch Update via Profile'), 'class' => array('CRM_Contact_Form_Task_PickProfile', 'CRM_Contact_Form_Task_Batch'), 'result' => true), 19 => array('title' => ts('Print PDF Letter for Contacts'), 'class' => 'CRM_Contact_Form_Task_PDF', 'result' => true), 21 => array('title' => ts('Merge Contacts'), 'class' => 'CRM_Contact_Form_Task_Merge', 'result' => true));
         if (CRM_Contact_BAO_ContactType::isActive('Household')) {
             $label = CRM_Contact_BAO_ContactType::getLabel('Household');
             self::$_tasks[9] = array('title' => ts('Add Contacts to %1', array(1 => $label)), 'class' => 'CRM_Contact_Form_Task_AddToHousehold', 'result' => true);
         }
         if (CRM_Contact_BAO_ContactType::isActive('Organization')) {
             $label = CRM_Contact_BAO_ContactType::getLabel('Organization');
             self::$_tasks[10] = array('title' => ts('Add Contacts to %1', array(1 => $label)), 'class' => 'CRM_Contact_Form_Task_AddToOrganization', 'result' => true);
         }
         //CRM-4418, check for delete
         if (!CRM_Core_Permission::check('delete contacts')) {
             unset(self::$_tasks[8]);
         }
         //show map action only if map provider and key is set
         $config =& CRM_Core_Config::singleton();
         if ($config->mapProvider && $config->mapAPIKey) {
             self::$_tasks[12] = array('title' => ts('Map Contacts'), 'class' => 'CRM_Contact_Form_Task_Map', 'result' => false);
         }
         if (CRM_Core_Permission::access('CiviEvent')) {
             self::$_tasks[18] = array('title' => ts('Add Contacts to Event'), 'class' => 'CRM_Event_Form_Participant', 'result' => true);
         }
         if (CRM_Core_Permission::access('CiviMail')) {
             self::$_tasks[20] = array('title' => ts('Schedule/Send a Mass Mailing'), 'class' => array('CRM_Mailing_Form_Group', 'CRM_Mailing_Form_Settings', 'CRM_Mailing_Form_Upload', 'CRM_Mailing_Form_Test', 'CRM_Mailing_Form_Schedule'), 'result' => false);
         }
         self::$_tasks += CRM_Core_Component::taskList();
         require_once 'CRM/Utils/Hook.php';
         CRM_Utils_Hook::searchTasks('contact', self::$_tasks);
         asort(self::$_tasks);
     }
 }
开发者ID:bhirsch,项目名称:civicrm,代码行数:33,代码来源:Task.php

示例2: initTasks

 public static function initTasks()
 {
     if (!self::$_tasks) {
         self::$_tasks = array(self::GROUP_CONTACTS => array('title' => ts('Group - add contacts'), 'class' => 'CRM_Contact_Form_Task_AddToGroup'), self::REMOVE_CONTACTS => array('title' => ts('Group - remove contacts'), 'class' => 'CRM_Contact_Form_Task_RemoveFromGroup'), self::TAG_CONTACTS => array('title' => ts('Tag - add to contacts'), 'class' => 'CRM_Contact_Form_Task_AddToTag'), self::REMOVE_TAGS => array('title' => ts('Tag - remove from contacts'), 'class' => 'CRM_Contact_Form_Task_RemoveFromTag'), self::EXPORT_CONTACTS => array('title' => ts('Export contacts'), 'class' => array('CRM_Export_Form_Select', 'CRM_Export_Form_Map'), 'result' => FALSE), self::EMAIL_CONTACTS => array('title' => ts('Email - send now (to 50 or less)'), 'class' => 'CRM_Contact_Form_Task_Email', 'result' => TRUE), self::DELETE_CONTACTS => array('title' => ts('Delete contacts'), 'class' => 'CRM_Contact_Form_Task_Delete', 'result' => FALSE), self::RECORD_CONTACTS => array('title' => ts('Add activity'), 'class' => 'CRM_Activity_Form_Activity'), self::SAVE_SEARCH => array('title' => ts('Smart group - create'), 'class' => 'CRM_Contact_Form_Task_SaveSearch', 'result' => TRUE), self::SAVE_SEARCH_UPDATE => array('title' => ts('Smart group - update'), 'class' => 'CRM_Contact_Form_Task_SaveSearch_Update', 'result' => TRUE), self::PRINT_CONTACTS => array('title' => ts('Print selected rows'), 'class' => 'CRM_Contact_Form_Task_Print', 'result' => FALSE), self::LABEL_CONTACTS => array('title' => ts('Mailing labels - print'), 'class' => 'CRM_Contact_Form_Task_Label', 'result' => TRUE), self::BATCH_UPDATE => array('title' => ts('Batch update contacts via profile'), 'class' => array('CRM_Contact_Form_Task_PickProfile', 'CRM_Contact_Form_Task_Batch'), 'result' => TRUE), self::PRINT_FOR_CONTACTS => array('title' => ts('PDF letters - print'), 'class' => 'CRM_Contact_Form_Task_PDF', 'result' => TRUE), self::EMAIL_UNHOLD => array('title' => ts('Email - unhold addresses'), 'class' => 'CRM_Contact_Form_Task_Unhold'), self::COMMUNICATION_PREFS => array('title' => ts('Communication preferences - alter'), 'class' => 'CRM_Contact_Form_Task_AlterPreferences'), self::RESTORE => array('title' => ts('Restore contacts from trash'), 'class' => 'CRM_Contact_Form_Task_Delete', 'result' => FALSE), self::DELETE_PERMANENTLY => array('title' => ts('Delete permanently'), 'class' => 'CRM_Contact_Form_Task_Delete', 'result' => FALSE));
         //CRM-16329, if SMS provider is configured show sms action.
         $providersCount = CRM_SMS_BAO_Provider::activeProviderCount();
         if ($providersCount) {
             self::$_tasks[self::SMS_CONTACTS] = array('title' => ts('SMS - schedule/send'), 'class' => 'CRM_Contact_Form_Task_SMS', 'result' => TRUE);
         }
         if (CRM_Contact_BAO_ContactType::isActive('Household')) {
             $label = CRM_Contact_BAO_ContactType::getLabel('household');
             self::$_tasks[self::HOUSEHOLD_CONTACTS] = array('title' => ts('Add relationship - to %1', array(1 => $label)), 'class' => 'CRM_Contact_Form_Task_AddToHousehold');
         }
         if (CRM_Contact_BAO_ContactType::isActive('Organization')) {
             $label = CRM_Contact_BAO_ContactType::getLabel('organization');
             self::$_tasks[self::ORGANIZATION_CONTACTS] = array('title' => ts('Add relationship - to %1', array(1 => $label)), 'class' => 'CRM_Contact_Form_Task_AddToOrganization');
         }
         if (CRM_Core_Permission::check('merge duplicate contacts')) {
             self::$_tasks[self::MERGE_CONTACTS] = array('title' => ts('Merge contacts'), 'class' => 'CRM_Contact_Form_Task_Merge', 'result' => TRUE);
         }
         //CRM-4418, check for delete
         if (!CRM_Core_Permission::check('delete contacts')) {
             unset(self::$_tasks[self::DELETE_CONTACTS]);
         }
         //show map action only if map provider and geoprovider are set (Google doesn't need geoprovider)
         // should fix this to be more flexible as providers are added ??
         $config = CRM_Core_Config::singleton();
         if ($config->mapProvider && ($config->mapProvider == 'Google' || ($config->mapProvider == 'OpenStreetMaps' || $config->geoProvider == 'Google'))) {
             self::$_tasks[self::MAP_CONTACTS] = array('title' => ts('Map contacts'), 'class' => 'CRM_Contact_Form_Task_Map', 'result' => FALSE);
         }
         if (CRM_Core_Permission::access('CiviEvent')) {
             self::$_tasks[self::ADD_EVENT] = array('title' => ts('Register participants for event'), 'class' => 'CRM_Event_Form_Participant');
         }
         if (CRM_Core_Permission::access('CiviMail') || CRM_Mailing_Info::workflowEnabled() && CRM_Core_Permission::check('create mailings')) {
             self::$_tasks[self::CREATE_MAILING] = array('title' => ts('Email - schedule/send via CiviMail'), 'class' => 'CRM_Mailing_Form_Task_AdhocMailing', 'result' => FALSE);
         }
         self::$_tasks += CRM_Core_Component::taskList();
         CRM_Utils_Hook::searchTasks('contact', self::$_tasks);
         asort(self::$_tasks);
     }
 }
开发者ID:nganivet,项目名称:civicrm-core,代码行数:41,代码来源:Task.php

示例3: initTasks

 public static function initTasks()
 {
     if (!self::$_tasks) {
         self::$_tasks = array(self::GROUP_CONTACTS => array('title' => ts('Add Contacts to Group'), 'class' => 'CRM_Contact_Form_Task_AddToGroup'), self::REMOVE_CONTACTS => array('title' => ts('Remove Contacts from Group'), 'class' => 'CRM_Contact_Form_Task_RemoveFromGroup'), self::TAG_CONTACTS => array('title' => ts('Tag Contacts (assign tags)'), 'class' => 'CRM_Contact_Form_Task_AddToTag'), self::REMOVE_TAGS => array('title' => ts('Untag Contacts (remove tags)'), 'class' => 'CRM_Contact_Form_Task_RemoveFromTag'), self::EXPORT_CONTACTS => array('title' => ts('Export Contacts'), 'class' => array('CRM_Export_Form_Select', 'CRM_Export_Form_Map'), 'result' => FALSE), self::EMAIL_CONTACTS => array('title' => ts('Send Email to Contacts'), 'class' => 'CRM_Contact_Form_Task_Email', 'result' => TRUE), self::SMS_CONTACTS => array('title' => ts('Send SMS to Contacts'), 'class' => 'CRM_Contact_Form_Task_SMS', 'result' => TRUE), self::DELETE_CONTACTS => array('title' => ts('Delete Contacts'), 'class' => 'CRM_Contact_Form_Task_Delete', 'result' => FALSE), self::RECORD_CONTACTS => array('title' => ts('Record Activity for Contacts'), 'class' => 'CRM_Activity_Form_Activity'), self::SAVE_SEARCH => array('title' => ts('New Smart Group'), 'class' => 'CRM_Contact_Form_Task_SaveSearch', 'result' => TRUE), self::SAVE_SEARCH_UPDATE => array('title' => ts('Update Smart Group'), 'class' => 'CRM_Contact_Form_Task_SaveSearch_Update', 'result' => TRUE), self::PRINT_CONTACTS => array('title' => ts('Print Selected Rows'), 'class' => 'CRM_Contact_Form_Task_Print', 'result' => FALSE), self::LABEL_CONTACTS => array('title' => ts('Mailing Labels'), 'class' => 'CRM_Contact_Form_Task_Label', 'result' => TRUE), self::BATCH_UPDATE => array('title' => ts('Batch Update via Profile'), 'class' => array('CRM_Contact_Form_Task_PickProfile', 'CRM_Contact_Form_Task_Batch'), 'result' => TRUE), self::PRINT_FOR_CONTACTS => array('title' => ts('Print PDF Letter for Contacts'), 'class' => 'CRM_Contact_Form_Task_PDF', 'result' => TRUE), self::EMAIL_UNHOLD => array('title' => ts('Unhold Emails'), 'class' => 'CRM_Contact_Form_Task_Unhold'), self::COMMUNICATION_PREFS => array('title' => ts('Alter Contact Communication Preferences'), 'class' => 'CRM_Contact_Form_Task_AlterPreferences'), self::RESTORE => array('title' => ts('Restore Contacts'), 'class' => 'CRM_Contact_Form_Task_Delete', 'result' => FALSE), self::DELETE_PERMANENTLY => array('title' => ts('Delete Permanently'), 'class' => 'CRM_Contact_Form_Task_Delete', 'result' => FALSE));
         if (CRM_Contact_BAO_ContactType::isActive('Household')) {
             $label = CRM_Contact_BAO_ContactType::getLabel('Household');
             self::$_tasks[self::HOUSEHOLD_CONTACTS] = array('title' => ts('Add Contacts to %1', array(1 => $label)), 'class' => 'CRM_Contact_Form_Task_AddToHousehold');
         }
         if (CRM_Contact_BAO_ContactType::isActive('Organization')) {
             $label = CRM_Contact_BAO_ContactType::getLabel('Organization');
             self::$_tasks[self::ORGANIZATION_CONTACTS] = array('title' => ts('Add Contacts to %1', array(1 => $label)), 'class' => 'CRM_Contact_Form_Task_AddToOrganization');
         }
         if (CRM_Core_Permission::check('merge duplicate contacts')) {
             self::$_tasks[self::MERGE_CONTACTS] = array('title' => ts('Merge Contacts'), 'class' => 'CRM_Contact_Form_Task_Merge', 'result' => TRUE);
         }
         //CRM-4418, check for delete
         if (!CRM_Core_Permission::check('delete contacts')) {
             unset(self::$_tasks[self::DELETE_CONTACTS]);
         }
         //show map action only if map provider and geoprovider are set (Google doesn't need geoprovider)
         // should fix this to be more flexible as providers are added ??
         $config = CRM_Core_Config::singleton();
         if ($config->mapProvider && ($config->mapProvider == 'Google' || ($config->mapProvider == 'OpenStreetMaps' || $config->geoProvider == 'Google'))) {
             self::$_tasks[self::MAP_CONTACTS] = array('title' => ts('Map Contacts'), 'class' => 'CRM_Contact_Form_Task_Map', 'result' => FALSE);
         }
         if (CRM_Core_Permission::access('CiviEvent')) {
             self::$_tasks[self::ADD_EVENT] = array('title' => ts('Add Contacts to Event'), 'class' => 'CRM_Event_Form_Participant');
         }
         if (defined('CIVICRM_CIVIMAIL_UI_LEGACY')) {
             if (CRM_Core_Permission::access('CiviMail')) {
                 self::$_tasks[self::CREATE_MAILING] = array('title' => ts('Schedule/Send a Mass Mailing'), 'class' => array('CRM_Mailing_Form_Group', 'CRM_Mailing_Form_Settings', 'CRM_Mailing_Form_Upload', 'CRM_Mailing_Form_Test', 'CRM_Mailing_Form_Schedule'), 'result' => FALSE);
             } elseif (CRM_Mailing_Info::workflowEnabled() && CRM_Core_Permission::check('create mailings')) {
                 self::$_tasks[self::CREATE_MAILING] = array('title' => ts('Create a Mass Mailing'), 'class' => array('CRM_Mailing_Form_Group', 'CRM_Mailing_Form_Settings', 'CRM_Mailing_Form_Upload', 'CRM_Mailing_Form_Test'), 'result' => FALSE);
             }
         } else {
             if (CRM_Core_Permission::access('CiviMail') || CRM_Mailing_Info::workflowEnabled() && CRM_Core_Permission::check('create mailings')) {
                 self::$_tasks[self::CREATE_MAILING] = array('title' => ts('Schedule/Send a Mass Mailing'), 'class' => 'CRM_Mailing_Form_Task_AdhocMailing', 'result' => FALSE);
             }
         }
         self::$_tasks += CRM_Core_Component::taskList();
         CRM_Utils_Hook::searchTasks('contact', self::$_tasks);
         asort(self::$_tasks);
     }
 }
开发者ID:kidaa30,项目名称:yes,代码行数:44,代码来源:Task.php

示例4: initTasks

 static function initTasks()
 {
     if (!self::$_tasks) {
         self::$_tasks = array(1 => array('title' => ts('Add Contacts to Group'), 'class' => 'CRM_Contact_Form_Task_AddToGroup'), 2 => array('title' => ts('Remove Contacts from Group'), 'class' => 'CRM_Contact_Form_Task_RemoveFromGroup'), 3 => array('title' => ts('Tag Contacts (assign tags)'), 'class' => 'CRM_Contact_Form_Task_AddToTag'), 4 => array('title' => ts('Untag Contacts (remove tags)'), 'class' => 'CRM_Contact_Form_Task_RemoveFromTag'), 5 => array('title' => ts('Export Contacts'), 'class' => array('CRM_Export_Form_Select', 'CRM_Export_Form_Map'), 'result' => FALSE), 6 => array('title' => ts('Send Email to Contacts'), 'class' => 'CRM_Contact_Form_Task_Email', 'result' => TRUE), 7 => array('title' => ts('Send SMS to Contacts'), 'class' => 'CRM_Contact_Form_Task_SMS', 'result' => TRUE), 8 => array('title' => ts('Delete Contacts'), 'class' => 'CRM_Contact_Form_Task_Delete', 'result' => FALSE), 11 => array('title' => ts('Record Activity for Contacts'), 'class' => 'CRM_Activity_Form_Activity'), 13 => array('title' => ts('New Smart Group'), 'class' => 'CRM_Contact_Form_Task_SaveSearch', 'result' => TRUE), 14 => array('title' => ts('Update Smart Group'), 'class' => 'CRM_Contact_Form_Task_SaveSearch_Update', 'result' => TRUE), 15 => array('title' => ts('Print Contacts'), 'class' => 'CRM_Contact_Form_Task_Print', 'result' => FALSE), 16 => array('title' => ts('Mailing Labels'), 'class' => 'CRM_Contact_Form_Task_Label', 'result' => TRUE), 17 => array('title' => ts('Batch Update via Profile'), 'class' => array('CRM_Contact_Form_Task_PickProfile', 'CRM_Contact_Form_Task_Batch'), 'result' => TRUE), 19 => array('title' => ts('Print PDF Letter for Contacts'), 'class' => 'CRM_Contact_Form_Task_PDF', 'result' => TRUE), 22 => array('title' => ts('Unhold Emails'), 'class' => 'CRM_Contact_Form_Task_Unhold'), 25 => array('title' => ts('Alter Contact Communication Preferences'), 'class' => 'CRM_Contact_Form_Task_AlterPreferences'), self::RESTORE => array('title' => ts('Restore Contacts'), 'class' => 'CRM_Contact_Form_Task_Delete', 'result' => FALSE), self::DELETE_PERMANENTLY => array('title' => ts('Delete Permanently'), 'class' => 'CRM_Contact_Form_Task_Delete', 'result' => FALSE));
         if (CRM_Contact_BAO_ContactType::isActive('Household')) {
             $label = CRM_Contact_BAO_ContactType::getLabel('Household');
             self::$_tasks[9] = array('title' => ts('Add Contacts to %1', array(1 => $label)), 'class' => 'CRM_Contact_Form_Task_AddToHousehold');
         }
         if (CRM_Contact_BAO_ContactType::isActive('Organization')) {
             $label = CRM_Contact_BAO_ContactType::getLabel('Organization');
             self::$_tasks[10] = array('title' => ts('Add Contacts to %1', array(1 => $label)), 'class' => 'CRM_Contact_Form_Task_AddToOrganization');
         }
         if (CRM_Core_Permission::check('merge duplicate contacts')) {
             self::$_tasks[21] = array('title' => ts('Merge Contacts'), 'class' => 'CRM_Contact_Form_Task_Merge', 'result' => TRUE);
         }
         //CRM-4418, check for delete
         if (!CRM_Core_Permission::check('delete contacts')) {
             unset(self::$_tasks[8]);
         }
         //show map action only if map provider and geoprovider are set (Google doesn't need geoprovider)
         // should fix this to be more flexible as providers are added ??
         $config = CRM_Core_Config::singleton();
         if ($config->mapProvider && ($config->mapProvider == 'Google' || ($config->mapProvider == 'OpenStreetMaps' || $config->geoProvider == 'Google'))) {
             self::$_tasks[12] = array('title' => ts('Map Contacts'), 'class' => 'CRM_Contact_Form_Task_Map', 'result' => FALSE);
         }
         if (CRM_Core_Permission::access('CiviEvent')) {
             self::$_tasks[18] = array('title' => ts('Add Contacts to Event'), 'class' => 'CRM_Event_Form_Participant');
         }
         if (CRM_Core_Permission::access('CiviMail')) {
             self::$_tasks[20] = array('title' => ts('Schedule/Send a Mass Mailing'), 'class' => array('CRM_Mailing_Form_Group', 'CRM_Mailing_Form_Settings', 'CRM_Mailing_Form_Upload', 'CRM_Mailing_Form_Test', 'CRM_Mailing_Form_Schedule'), 'result' => FALSE);
         } elseif (CRM_Mailing_Info::workflowEnabled() && CRM_Core_Permission::check('create mailings')) {
             self::$_tasks[20] = array('title' => ts('Create a Mass Mailing'), 'class' => array('CRM_Mailing_Form_Group', 'CRM_Mailing_Form_Settings', 'CRM_Mailing_Form_Upload', 'CRM_Mailing_Form_Test'), 'result' => FALSE);
         }
         self::$_tasks += CRM_Core_Component::taskList();
         CRM_Utils_Hook::searchTasks('contact', self::$_tasks);
         asort(self::$_tasks);
     }
 }
开发者ID:hguru,项目名称:224Civi,代码行数:38,代码来源:Task.php


注:本文中的CRM_Core_Component::taskList方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。