class CRM_Extension_Browser

This class glues together the various parts of the extension system.

Constants

DEFAULT_EXTENSIONS_REPOSITORY

An URL for public extensions repository.

Note: This default is now handled through setting/*.php.

SINGLE_FILE_PATH

Relative path below remote repository URL for single extensions file.

CACHE_JSON_FILE

The name of the single JSON extension cache file.

CHECK_TIMEOUT

Methods

__construct(string $repoUrl, string $indexPath, string $cacheDir)

No description

bool
isEnabled()

Determine whether the system policy allows downloading new extensions.

string
getRepositoryUrl()

No description

refresh()

Refresh the cache of remotely-available extensions.

array
checkRequirements()

Determine whether downloading is supported.

array
getExtensions()

Get a list of all available extensions.

getExtension(string $key)

Get a description of a particular extension.

static 
downloadError($errorNumber, $errorString)

A dummy function required for suppressing download errors.

Details

at line 67
__construct(string $repoUrl, string $indexPath, string $cacheDir)

Parameters

string $repoUrl URL of the remote repository.
string $indexPath Relative path of the 'index' file within the repository.
string $cacheDir Local path in which to cache files.

at line 84
bool isEnabled()

Determine whether the system policy allows downloading new extensions.

This is reflection of policy and intent; it does not indicate whether the browser will actually work. For that, see checkRequirements().

Return Value

bool

at line 91
string getRepositoryUrl()

Return Value

string

at line 98
refresh()

Refresh the cache of remotely-available extensions.

at line 111
array checkRequirements()

Determine whether downloading is supported.

Return Value

array List of error messages; empty if OK.

at line 141
array getExtensions()

Get a list of all available extensions.

Return Value

array ($key => CRM_Extension_Info)

at line 166
CRM_Extension_Info|NULL getExtension(string $key)

Get a description of a particular extension.

Parameters

string $key Fully-qualified extension name.

Return Value

CRM_Extension_Info|NULL

at line 282
static downloadError($errorNumber, $errorString)

A dummy function required for suppressing download errors.

Parameters

$errorNumber
$errorString