CRM_Extension_QueueTasks
in package
Library of queue-tasks which are useful for extension-management.
Table of Contents
Methods
- cleanup() : bool
- enable() : bool
- Enable the listed extensions.
- fetch() : bool
- Download extension ($key) from $url and store it in {$stagingPath}/new/{$key}.
- preverify() : bool
- Scan the downloaded extensions and verify that their requirements are satisfied.
- rebuild() : bool
- swap() : bool
- Take the extracted code (`stagingDir/new/{key}`) and put it into its final place.
- upgradeDb() : bool
Methods
cleanup()
public
static cleanup(CRM_Queue_TaskContext $ctx, string $stagingPath) : bool
Parameters
- $ctx : CRM_Queue_TaskContext
- $stagingPath : string
Return values
boolenable()
Enable the listed extensions.
public
static enable(CRM_Queue_TaskContext $ctx, string|null $stagingPath, array<string|int, mixed> $keys) : bool
Parameters
- $ctx : CRM_Queue_TaskContext
- $stagingPath : string|null
- $keys : array<string|int, mixed>
Return values
boolfetch()
Download extension ($key) from $url and store it in {$stagingPath}/new/{$key}.
public
static fetch(CRM_Queue_TaskContext $ctx, string $stagingPath, string $key, string $url) : bool
Parameters
- $ctx : CRM_Queue_TaskContext
- $stagingPath : string
- $key : string
- $url : string
Return values
boolpreverify()
Scan the downloaded extensions and verify that their requirements are satisfied.
public
static preverify(CRM_Queue_TaskContext $ctx, string $stagingPath, array<string|int, mixed> $keys) : bool
This checks requirements as declared in the staging area.
Parameters
- $ctx : CRM_Queue_TaskContext
- $stagingPath : string
- $keys : array<string|int, mixed>
Return values
boolrebuild()
public
static rebuild(CRM_Queue_TaskContext $ctx) : bool
Parameters
- $ctx : CRM_Queue_TaskContext
Return values
boolswap()
Take the extracted code (`stagingDir/new/{key}`) and put it into its final place.
public
static swap(CRM_Queue_TaskContext $ctx, string $stagingPath, array<string|int, mixed> $keys) : bool
Move any old code to the backup (stagingDir/old/{key}).
Delete the container-cache
Parameters
- $ctx : CRM_Queue_TaskContext
- $stagingPath : string
- $keys : array<string|int, mixed>
Return values
boolupgradeDb()
public
static upgradeDb(CRM_Queue_TaskContext $ctx) : bool
Parameters
- $ctx : CRM_Queue_TaskContext