Documentation

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

enable()

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
bool

fetch()

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
bool

preverify()

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
bool

swap()

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
bool

        
On this page

Search results