CRM_Mailing_Task
extends CRM_Core_Task
in package
class to represent the actions that can be performed on a group of contacts used by the search forms.
Table of Contents
Constants
- BATCH_UPDATE = 6
- These constants are only used as enumerators for each of the batch tasks.
- CREATE_MAILING = 14
- These constants are only used as enumerators for each of the batch tasks.
- DELETE_PERMANENTLY = 15
- These constants are only used as enumerators for each of the batch tasks.
- GROUP_ADD = 2
- These constants are only used as enumerators for each of the batch tasks.
- GROUP_REMOVE = 1
- These constants are only used as enumerators for each of the batch tasks.
- LABEL_CONTACTS = 16
- These constants are only used as enumerators for each of the batch tasks.
- PDF_LETTER = 3
- These constants are only used as enumerators for each of the batch tasks.
- SAVE_SEARCH = 12
- These constants are only used as enumerators for each of the batch tasks.
- SAVE_SEARCH_UPDATE = 13
- These constants are only used as enumerators for each of the batch tasks.
- TAG_ADD = 10
- These constants are only used as enumerators for each of the batch tasks.
- TAG_REMOVE = 11
- These constants are only used as enumerators for each of the batch tasks.
- TASK_DELETE = 4
- These constants are only used as enumerators for each of the batch tasks.
- TASK_EMAIL = 9
- These constants are only used as enumerators for each of the batch tasks.
- TASK_EXPORT = 8
- These constants are only used as enumerators for each of the batch tasks.
- TASK_PRINT = 5
- These constants are only used as enumerators for each of the batch tasks.
- TASK_SMS = 7
- These constants are only used as enumerators for each of the batch tasks.
Properties
- $_tasks : array<string|int, mixed>
- The task array
- $objectType : string
Methods
- corePermissionedTaskTitles() : array<string|int, mixed>
- Show tasks selectively based on the permission level of the user This function should be called by permissionedTaskTitles in children
- getTask() : array<string|int, mixed>
- These tasks are the core set of tasks that the user can perform.
- getTaskAndTitleByClass() : array<string|int, mixed>
- Function to return the task information on basis of provided task's form name
- permissionedTaskTitles() : array<string|int, mixed>
- Show tasks selectively based on the permission level of the user.
- tasks() : array<string|int, mixed>
- These tasks are the core set of tasks that the user can perform on a contact / group of contacts.
- taskTitles() : array<string|int, mixed>
- These tasks are the core set of tasks that the user can perform on a contact / group of contacts
- getTasksFilteredByPermission() : array<string|int, mixed>
- Filter tasks based on the permission key, if available.
- getTitlesFilteredByPermission() : array<string|int, mixed>
- Get task tiles filtered by any declared permissions.
Constants
BATCH_UPDATE
These constants are only used as enumerators for each of the batch tasks.
public
mixed
BATCH_UPDATE
= 6
CREATE_MAILING
These constants are only used as enumerators for each of the batch tasks.
public
mixed
CREATE_MAILING
= 14
DELETE_PERMANENTLY
These constants are only used as enumerators for each of the batch tasks.
public
mixed
DELETE_PERMANENTLY
= 15
GROUP_ADD
These constants are only used as enumerators for each of the batch tasks.
public
mixed
GROUP_ADD
= 2
GROUP_REMOVE
These constants are only used as enumerators for each of the batch tasks.
public
mixed
GROUP_REMOVE
= 1
LABEL_CONTACTS
These constants are only used as enumerators for each of the batch tasks.
public
mixed
LABEL_CONTACTS
= 16
PDF_LETTER
These constants are only used as enumerators for each of the batch tasks.
public
mixed
PDF_LETTER
= 3
SAVE_SEARCH
These constants are only used as enumerators for each of the batch tasks.
public
mixed
SAVE_SEARCH
= 12
SAVE_SEARCH_UPDATE
These constants are only used as enumerators for each of the batch tasks.
public
mixed
SAVE_SEARCH_UPDATE
= 13
TAG_ADD
These constants are only used as enumerators for each of the batch tasks.
public
mixed
TAG_ADD
= 10
TAG_REMOVE
These constants are only used as enumerators for each of the batch tasks.
public
mixed
TAG_REMOVE
= 11
TASK_DELETE
These constants are only used as enumerators for each of the batch tasks.
public
mixed
TASK_DELETE
= 4
TASK_EMAIL
These constants are only used as enumerators for each of the batch tasks.
public
mixed
TASK_EMAIL
= 9
TASK_EXPORT
These constants are only used as enumerators for each of the batch tasks.
public
mixed
TASK_EXPORT
= 8
TASK_PRINT
These constants are only used as enumerators for each of the batch tasks.
public
mixed
TASK_PRINT
= 5
TASK_SMS
These constants are only used as enumerators for each of the batch tasks.
public
mixed
TASK_SMS
= 7
Properties
$_tasks
The task array
public
static array<string|int, mixed>
$_tasks
= []
$objectType
public
static string
$objectType
= 'mailing'
This must be defined in each child class. It is passed to the searchTasks hook. Example: $objectType = 'event';
Methods
corePermissionedTaskTitles()
Show tasks selectively based on the permission level of the user This function should be called by permissionedTaskTitles in children
public
static corePermissionedTaskTitles(array<string|int, mixed> $tasks, int $permission, array<string|int, mixed> $params) : array<string|int, mixed>
Parameters
- $tasks : array<string|int, mixed>
-
The array of tasks generated by permissionedTaskTitles
- $permission : int
- $params : array<string|int, mixed>
-
"ssID: Saved Search ID": If !empty we are in saved search context
Return values
array<string|int, mixed> —set of tasks that are valid for the user
getTask()
These tasks are the core set of tasks that the user can perform.
public
static getTask(int $value) : array<string|int, mixed>
on mailing recipients.
Parameters
- $value : int
Return values
array<string|int, mixed> —the set of tasks for a group of mailing recipients
getTaskAndTitleByClass()
Function to return the task information on basis of provided task's form name
public
static getTaskAndTitleByClass(string $className) : array<string|int, mixed>
Parameters
- $className : string
Return values
array<string|int, mixed> —[ 0 => Task ID, 1 => Task Title ]
permissionedTaskTitles()
Show tasks selectively based on the permission level of the user.
public
static permissionedTaskTitles(int $permission[, array<string|int, mixed> $params = [] ]) : array<string|int, mixed>
Parameters
- $permission : int
- $params : array<string|int, mixed> = []
Return values
array<string|int, mixed> —set of tasks that are valid for the user
tasks()
These tasks are the core set of tasks that the user can perform on a contact / group of contacts.
public
static tasks() : array<string|int, mixed>
Return values
array<string|int, mixed> —the set of tasks for a group of contacts.
taskTitles()
These tasks are the core set of tasks that the user can perform on a contact / group of contacts
public
static taskTitles() : array<string|int, mixed>
Return values
array<string|int, mixed> —the set of tasks for a group of contacts
getTasksFilteredByPermission()
Filter tasks based on the permission key, if available.
protected
static getTasksFilteredByPermission(array<string|int, mixed> $tasks, bool $hasEditContactPermission) : array<string|int, mixed>
Parameters
- $tasks : array<string|int, mixed>
- $hasEditContactPermission : bool
-
Does the user have permission to edit the given contact. Required where permission to edit the user is required in conjunction with permission to do the task.
Return values
array<string|int, mixed>getTitlesFilteredByPermission()
Get task tiles filtered by any declared permissions.
protected
static getTitlesFilteredByPermission(array<string|int, mixed> $tasks, bool $hasEditContactPermission) : array<string|int, mixed>
Parameters
- $tasks : array<string|int, mixed>
- $hasEditContactPermission : bool
-
Does the user have permission to edit the given contact. Required where permission to edit the user is required in conjunction with permission to do the task.