3 +--------------------------------------------------------------------+
4 | Copyright CiviCRM LLC. All rights reserved. |
6 | This work is published under the GNU AGPLv3 license with some |
7 | permitted exceptions and without any warranty. For full license |
8 | and copyright information, see https://civicrm.org/licensing |
9 +--------------------------------------------------------------------+
15 * @copyright CiviCRM LLC https://civicrm.org/licensing
19 * class to represent the actions that can be performed on a group of contacts
20 * used by the search forms.
23 class CRM_Mailing_Task
extends CRM_Core_Task
{
25 public static $objectType = 'mailing';
28 * These tasks are the core set of tasks that the user can perform
29 * on a contact / group of contacts.
32 * the set of tasks for a group of contacts.
34 public static function tasks() {
35 if (!(self
::$_tasks)) {
38 'title' => ts('Print Mailing Recipients'),
39 'class' => 'CRM_Mailing_Form_Task_Print',
51 * Show tasks selectively based on the permission level
54 * @param int $permission
55 * @param array $params
58 * set of tasks that are valid for the user
60 public static function permissionedTaskTitles($permission, $params = []) {
63 $tasks = parent
::corePermissionedTaskTitles($tasks, $permission, $params);
68 * These tasks are the core set of tasks that the user can perform.
69 * on mailing recipients.
74 * the set of tasks for a group of mailing recipients
76 public static function getTask($value) {
78 if (!$value ||
!CRM_Utils_Array
::value($value, self
::$_tasks)) {
79 // make the print task by default
80 $value = self
::TASK_PRINT
;
84 self
::$_tasks[$value]['class'],
85 self
::$_tasks[$value]['result'],