Documentation

CRM_Contribute_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_INVOICE  = 404
Contribution tasks
PDF_LETTER  = 3
These constants are only used as enumerators for each of the batch tasks.
PDF_RECEIPT  = 402
Contribution tasks
PDF_THANKYOU  = 403
Contribution 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.
UPDATE_STATUS  = 401
Contribution 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
getContextualLinks()  : array<string|int, mixed>
Get links appropriate to the context of the row.
getTask()  : array<string|int, mixed>
These tasks are the core set of tasks that the user can perform on contributors
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_INVOICE

Contribution tasks

public mixed PDF_INVOICE = 404

PDF_LETTER

These constants are only used as enumerators for each of the batch tasks.

public mixed PDF_LETTER = 3

PDF_RECEIPT

Contribution tasks

public mixed PDF_RECEIPT = 402

PDF_THANKYOU

Contribution tasks

public mixed PDF_THANKYOU = 403

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

UPDATE_STATUS

Contribution tasks

public mixed UPDATE_STATUS = 401

Properties

$_tasks

The task array

public static array<string|int, mixed> $_tasks = []

$objectType

public static string $objectType = 'contribution'

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

Get links appropriate to the context of the row.

public static getContextualLinks(array<string|int, mixed> $row) : array<string|int, mixed>
Parameters
$row : array<string|int, mixed>
Return values
array<string|int, mixed>

getTask()

These tasks are the core set of tasks that the user can perform on contributors

public static getTask(int $value) : array<string|int, mixed>
Parameters
$value : int
Return values
array<string|int, mixed>

the set of tasks for a group of contributors

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> = []

bool softCreditFiltering: derived from CRM_Contribute_BAO_Query::isSoftCreditOptionEnabled

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.

Return values
array<string|int, mixed>

        
On this page

Search results