Documentation

Extension.php

Table of Contents

Constants

API_V3_EXTENSION_DELIMITER  = ','

Functions

civicrm_api3_extension_install()  : array<string|int, mixed>
Install an extension.
_civicrm_api3_extension_install_spec()  : mixed
Spec function for getfields
civicrm_api3_extension_upgrade()  : array<string|int, mixed>
Upgrade an extension - runs upgrade_N hooks and system.flush.
civicrm_api3_extension_enable()  : array<string|int, mixed>
Enable an extension.
_civicrm_api3_extension_enable_spec()  : mixed
Spec function for getfields
civicrm_api3_extension_disable()  : array<string|int, mixed>
Disable an extension.
_civicrm_api3_extension_disable_spec()  : mixed
Spec function for getfields
civicrm_api3_extension_uninstall()  : array<string|int, mixed>
Uninstall an extension.
_civicrm_api3_extension_uninstall_spec()  : mixed
Spec function for getfields
civicrm_api3_extension_download()  : array<string|int, mixed>
Download and install an extension.
_civicrm_api3_extension_download_spec()  : mixed
Spec function for getfields
civicrm_api3_extension_refresh()  : array<string|int, mixed>
Download and install an extension.
_civicrm_api3_extension_refresh_spec()  : mixed
Spec function for getfields
civicrm_api3_extension_get()  : array<string|int, mixed>
Get a list of available extensions.
civicrm_api3_extension_getremote()  : array<string|int, mixed>
Get a list of remotely available extensions.
_civicrm_api3_getKeys()  : array<string|int, mixed>
Determine the list of extension keys.

Constants

API_V3_EXTENSION_DELIMITER

public mixed API_V3_EXTENSION_DELIMITER = ','

Functions

civicrm_api3_extension_install()

Install an extension.

civicrm_api3_extension_install(array<string|int, mixed> $params) : array<string|int, mixed>
Parameters
$params : array<string|int, mixed>

Input parameters.

  • key: string, eg "com.example.myextension"
  • keys: array of string, eg array("com.example.myextension1", "com.example.myextension2")
  • path: string, e.g. "/var/www/extensions/*"

Using 'keys' should be more performant than making multiple API calls with 'key'

Return values
array<string|int, mixed>

_civicrm_api3_extension_install_spec()

Spec function for getfields

_civicrm_api3_extension_install_spec(array<string|int, mixed> &$fields) : mixed
Parameters
$fields : array<string|int, mixed>

civicrm_api3_extension_upgrade()

Upgrade an extension - runs upgrade_N hooks and system.flush.

civicrm_api3_extension_upgrade() : array<string|int, mixed>
Return values
array<string|int, mixed>

API result

civicrm_api3_extension_enable()

Enable an extension.

civicrm_api3_extension_enable(array<string|int, mixed> $params) : array<string|int, mixed>
Parameters
$params : array<string|int, mixed>

Input parameters.

  • key: string, eg "com.example.myextension"
  • keys: array of string, eg array("com.example.myextension1", "com.example.myextension2")
  • path: string, e.g. "/var/www/vendor/foo/myext" or "/var/www/vendor/*"

Using 'keys' should be more performant than making multiple API calls with 'key'

Return values
array<string|int, mixed>

_civicrm_api3_extension_enable_spec()

Spec function for getfields

_civicrm_api3_extension_enable_spec(array<string|int, mixed> &$fields) : mixed
Parameters
$fields : array<string|int, mixed>

civicrm_api3_extension_disable()

Disable an extension.

civicrm_api3_extension_disable(array<string|int, mixed> $params) : array<string|int, mixed>
Parameters
$params : array<string|int, mixed>

Input parameters.

  • key: string, eg "com.example.myextension"
  • keys: array of string, eg array("com.example.myextension1", "com.example.myextension2")
  • path: string, e.g. "/var/www/vendor/foo/myext" or "/var/www/vendor/*"

Using 'keys' should be more performant than making multiple API calls with 'key'

Return values
array<string|int, mixed>

_civicrm_api3_extension_disable_spec()

Spec function for getfields

_civicrm_api3_extension_disable_spec(array<string|int, mixed> &$fields) : mixed
Parameters
$fields : array<string|int, mixed>

civicrm_api3_extension_uninstall()

Uninstall an extension.

civicrm_api3_extension_uninstall(array<string|int, mixed> $params) : array<string|int, mixed>
Parameters
$params : array<string|int, mixed>

Input parameters.

  • key: string, eg "com.example.myextension"
  • keys: array of string, eg array("com.example.myextension1", "com.example.myextension2")
  • path: string, e.g. "/var/www/vendor/foo/myext" or "/var/www/vendor/*"

Using 'keys' should be more performant than making multiple API calls with 'key'

Tags
todo:

removeFiles as optional param

Return values
array<string|int, mixed>

_civicrm_api3_extension_uninstall_spec()

Spec function for getfields

_civicrm_api3_extension_uninstall_spec(array<string|int, mixed> &$fields) : mixed
Parameters
$fields : array<string|int, mixed>

civicrm_api3_extension_download()

Download and install an extension.

civicrm_api3_extension_download(array<string|int, mixed> $params) : array<string|int, mixed>
Parameters
$params : array<string|int, mixed>

Input parameters.

  • key: string, eg "com.example.myextension"
  • url: string eg "http://repo.com/myextension-1.0.zip"
Tags
throws
CRM_Core_Exception
Return values
array<string|int, mixed>

API result

_civicrm_api3_extension_download_spec()

Spec function for getfields

_civicrm_api3_extension_download_spec(array<string|int, mixed> &$fields) : mixed
Parameters
$fields : array<string|int, mixed>

civicrm_api3_extension_refresh()

Download and install an extension.

civicrm_api3_extension_refresh(array<string|int, mixed> $params) : array<string|int, mixed>
Parameters
$params : array<string|int, mixed>

Input parameters.

  • local: bool, whether to rescan local filesystem (default: TRUE)
  • remote: bool, whether to rescan remote repository (default: TRUE)
Return values
array<string|int, mixed>

API result

_civicrm_api3_extension_refresh_spec()

Spec function for getfields

_civicrm_api3_extension_refresh_spec(array<string|int, mixed> &$fields) : mixed
Parameters
$fields : array<string|int, mixed>

civicrm_api3_extension_get()

Get a list of available extensions.

civicrm_api3_extension_get(array<string|int, mixed> $params) : array<string|int, mixed>
Parameters
$params : array<string|int, mixed>
Return values
array<string|int, mixed>

API result

civicrm_api3_extension_getremote()

Get a list of remotely available extensions.

civicrm_api3_extension_getremote(array<string|int, mixed> $params) : array<string|int, mixed>
Parameters
$params : array<string|int, mixed>
Return values
array<string|int, mixed>

API result

_civicrm_api3_getKeys()

Determine the list of extension keys.

_civicrm_api3_getKeys(array<string|int, mixed> $params[, string $key = 'keys' ]) : array<string|int, mixed>
Parameters
$params : array<string|int, mixed>
$key : string = 'keys'

API request params with 'keys' or 'path'.

  • keys: A comma-delimited list of extension names
  • path: An absolute directory path. May append '*' to match all sub-directories.
Return values
array<string|int, mixed>

        
On this page

Search results