Documentation

CRM_Extension_Upgrader_Interface

An "upgrader" is a class that handles the DB install+upgrade lifecycle for an extension.

Table of Contents

Methods

init()  : mixed
notify()  : mixed
Notify the upgrader about a key lifecycle event, such as installation or uninstallation.

Methods

init()

public init(array<string|int, mixed> $params) : mixed
Parameters
$params : array<string|int, mixed>
  • string $key: Long form name ('org.example.myext')

notify()

Notify the upgrader about a key lifecycle event, such as installation or uninstallation.

public notify(string $event[, array<string|int, mixed> $params = [] ]) : mixed

Each event corresponds to a hook, such as hook_civicrm_install or hook_civicrm_upgrade.

Parameters
$event : string

One of the following: 'install', 'onPostInstall', 'enable', 'disable', 'uninstall', 'upgrade'

$params : array<string|int, mixed> = []

Any data that would ordinarily be provided via the equivalent hook.


        
On this page

Search results