Documentation

Setup
in package

Table of Contents

Constants

PRIORITY_END  = -2000
PRIORITY_LATE  = -1000
PRIORITY_MAIN  = 0
PRIORITY_PREPARE  = 1000
PRIORITY_START  = 2000
PROTOCOL  = '1.1'

Properties

$dispatcher  : EventDispatcherInterface
$log  : LoggerInterface
$model  : Model
$pendingAction  : string|null
$instance  : mixed

Methods

assertProtocolCompatibility()  : mixed
Assert that this copy of civicrm-setup is compatible with the client.
assertRunning()  : mixed
Assert that the "Setup" subsystem is running.
checkAuthorized()  : CheckAuthorizedEvent
Determine whether the current CMS user is authorized to perform installation.
checkInstalled()  : CheckInstalledEvent
Determine whether the setting and/or schema are already installed.
checkRequirements()  : CheckRequirementsEvent
Determine whether the local environment meets system requirements.
createController()  : UIConstructEvent
Create a page-controller for a web-based installation form.
dispatcher()  : EventDispatcherInterface
getDispatcher()  : EventDispatcherInterface
getLog()  : LoggerInterface
getModel()  : Model
getPendingAction()  : null|string
init()  : mixed
The initialization process loads any `*.civi-setup.php` files and fires the `civi.setup.init` event.
installDatabase()  : InstallDatabaseEvent
Create the database schema.
installFiles()  : InstallFilesEvent
Create the settings file.
instance()  : Setup
log()  : LoggerInterface
uninstallDatabase()  : UninstallDatabaseEvent
Remove the database schema.
uninstallFiles()  : UninstallFilesEvent
Remove the settings file.

Constants

PRIORITY_END

public mixed PRIORITY_END = -2000

PRIORITY_LATE

public mixed PRIORITY_LATE = -1000

PRIORITY_MAIN

public mixed PRIORITY_MAIN = 0

PRIORITY_PREPARE

public mixed PRIORITY_PREPARE = 1000

PRIORITY_START

public mixed PRIORITY_START = 2000

PROTOCOL

public mixed PROTOCOL = '1.1'

Properties

$dispatcher

protected EventDispatcherInterface $dispatcher

$log

protected LoggerInterface $log

$pendingAction

protected string|null $pendingAction = NULL

$instance

private static mixed $instance

Methods

assertProtocolCompatibility()

Assert that this copy of civicrm-setup is compatible with the client.

public static assertProtocolCompatibility(string $expectedVersion) : mixed
Parameters
$expectedVersion : string
Tags
throws
Exception

assertRunning()

Assert that the "Setup" subsystem is running.

public static assertRunning() : mixed

This function is mostly just a placeholder -- in practice, if someone makes a failed call to assertRunning(), it will probably manifest as an unknown class/function. But this gives us a pretty, one-line, syntactically-valid way to make the assertion.

dispatcher()

public static dispatcher() : EventDispatcherInterface
Return values
EventDispatcherInterface

getDispatcher()

public getDispatcher() : EventDispatcherInterface
Return values
EventDispatcherInterface

getLog()

public getLog() : LoggerInterface
Return values
LoggerInterface

getPendingAction()

public getPendingAction() : null|string
Return values
null|string

The name of a pending installation action, or NULL if none are active. Ex: 'installDatabase', 'uninstallFiles'

init()

The initialization process loads any `*.civi-setup.php` files and fires the `civi.setup.init` event.

public static init([array<string|int, mixed> $modelValues = array() ][, callable $pluginCallback = NULL ][, LoggerInterface $log = NULL ]) : mixed
Parameters
$modelValues : array<string|int, mixed> = array()

List of default configuration options.

  • cms: string name
  • srcPath: Path to CiviCRM-core source tree, i.e. .../vendor/civicrm/civicrm-core/
$pluginCallback : callable = NULL

Function which manipulates the list of plugin files. Use this to add, remove, or re-order callbacks. function(array $files) => array Ex: ['hello' => '/var/www/plugins/hello.civi-setup.php']

$log : LoggerInterface = NULL

log()

public static log() : LoggerInterface
Return values
LoggerInterface

        
On this page

Search results