Queue
extends DAOEntity
in package
uses
ManagedEntity
Track a list of durable/scannable queues.
Registering a queue in this table (and setting is_auto=1
) can
allow it to execute tasks automatically in the background.
Tags
Table of Contents
Methods
- __callStatic() : AbstractAction
- Magic method to return the action object for an api.
- autocomplete() : AutocompleteAction
- checkAccess() : CheckAccessAction
- claimItems() : ClaimItems
- Claim some items from the queue. Returns zero or more items.
- create() : DAOCreateAction
- delete() : DAODeleteAction
- export() : ExportAction
- get() : DAOGetAction
- getActions() : GetActions
- getEntityName() : string
- Get entity name from called class
- getFields() : DAOGetFieldsAction
- getInfo() : array{name: string, title: string, description: string, title_plural: string, type: string, paths: array, class: string, primary_key: array, searchable: string, dao: string, label_field: string, icon: string}
- Reflection function called by Entity::get()
- getLinks() : GetLinks
- permissions() : array<string|int, mixed>
- Returns a list of permissions needed to access the various actions in this api.
- replace() : BasicReplaceAction
- revert() : BasicBatchAction
- run() : Run
- Run a series of items from a queue.
- runItems() : RunItems
- Run some items from the queue.
- save() : DAOSaveAction
- update() : DAOUpdateAction
- getDaoName() : CRM_Core_DAO|string|null
- getEntityTitle() : string
- Overridable function to return a localized title for this entity.
Methods
__callStatic()
Magic method to return the action object for an api.
public
static __callStatic(string $action, array<string|int, mixed> $args) : AbstractAction
Parameters
- $action : string
- $args : array<string|int, mixed>
Tags
Return values
AbstractActionautocomplete()
public
static autocomplete([bool $checkPermissions = TRUE ]) : AutocompleteAction
Parameters
- $checkPermissions : bool = TRUE
Return values
AutocompleteActioncheckAccess()
public
static checkAccess() : CheckAccessAction
Return values
CheckAccessActionclaimItems()
Claim some items from the queue. Returns zero or more items.
public
static claimItems([bool $checkPermissions = TRUE ]) : ClaimItems
Note: This is appropriate for persistent, auto-run queues.
The number of items depends on the specific queue. Most notably, batch sizes are
influenced by queue-driver support (BatchQueueInterface
) and queue-configuration
(civicrm_queue.batch_limit
).
Parameters
- $checkPermissions : bool = TRUE
Return values
ClaimItemscreate()
public
static create([bool $checkPermissions = TRUE ]) : DAOCreateAction
Parameters
- $checkPermissions : bool = TRUE
Return values
DAOCreateActiondelete()
public
static delete([bool $checkPermissions = TRUE ]) : DAODeleteAction
Parameters
- $checkPermissions : bool = TRUE
Return values
DAODeleteActionexport()
public
static export([bool $checkPermissions = TRUE ]) : ExportAction
Parameters
- $checkPermissions : bool = TRUE
Return values
ExportActionget()
public
static get([bool $checkPermissions = TRUE ]) : DAOGetAction
Parameters
- $checkPermissions : bool = TRUE
Return values
DAOGetActiongetActions()
public
static getActions([bool $checkPermissions = TRUE ]) : GetActions
Parameters
- $checkPermissions : bool = TRUE
Return values
GetActionsgetEntityName()
Get entity name from called class
public
static getEntityName() : string
Return values
stringgetFields()
public
static getFields([bool $checkPermissions = TRUE ]) : DAOGetFieldsAction
Parameters
- $checkPermissions : bool = TRUE
Return values
DAOGetFieldsActiongetInfo()
Reflection function called by Entity::get()
public
static getInfo() : array{name: string, title: string, description: string, title_plural: string, type: string, paths: array, class: string, primary_key: array, searchable: string, dao: string, label_field: string, icon: string}
Tags
Return values
array{name: string, title: string, description: string, title_plural: string, type: string, paths: array, class: string, primary_key: array, searchable: string, dao: string, label_field: string, icon: string}getLinks()
public
static getLinks([bool $checkPermissions = TRUE ]) : GetLinks
Parameters
- $checkPermissions : bool = TRUE
Return values
GetLinkspermissions()
Returns a list of permissions needed to access the various actions in this api.
public
static permissions() : array<string|int, mixed>
Return values
array<string|int, mixed>replace()
public
static replace([bool $checkPermissions = TRUE ]) : BasicReplaceAction
Parameters
- $checkPermissions : bool = TRUE
Return values
BasicReplaceActionrevert()
public
static revert([bool $checkPermissions = TRUE ]) : BasicBatchAction
Parameters
- $checkPermissions : bool = TRUE
Return values
BasicBatchActionrun()
Run a series of items from a queue.
public
static run([bool $checkPermissions = TRUE ]) : Run
This is a lightweight main-loop for development/testing. It may have some limited utility for sysadmins who want to fine-tune runners on a specific queue. See the class docblock for more information.
Parameters
- $checkPermissions : bool = TRUE
Return values
RunrunItems()
Run some items from the queue.
public
static runItems([bool $checkPermissions = TRUE ]) : RunItems
Note: This is appropriate for persistent, auto-run queues.
The number of items depends on the specific queue. Most notably, batch sizes are
influenced by queue-driver support (BatchQueueInterface
) and queue-configuration
(civicrm_queue.batch_limit
).
Parameters
- $checkPermissions : bool = TRUE
Return values
RunItemssave()
public
static save([bool $checkPermissions = TRUE ]) : DAOSaveAction
Parameters
- $checkPermissions : bool = TRUE
Return values
DAOSaveActionupdate()
public
static update([bool $checkPermissions = TRUE ]) : DAOUpdateAction
Parameters
- $checkPermissions : bool = TRUE
Return values
DAOUpdateActiongetDaoName()
protected
static getDaoName() : CRM_Core_DAO|string|null
Return values
CRM_Core_DAO|string|nullgetEntityTitle()
Overridable function to return a localized title for this entity.
protected
static getEntityTitle([bool $plural = FALSE ]) : string
Parameters
- $plural : bool = FALSE
-
Whether to return a plural title.