Model
in package
Class Model
Table of Contents
Properties
- $cms : string
- $cmsBaseUrl : string
- $cmsDb : array<string|int, mixed>
- $components : array<string|int, mixed>
- $credKeys : array<string|int, string>
- $db : array<string|int, mixed>
- $deployID : string
- $extensions : array<string|int, mixed>
- $extras : array<string|int, mixed>
- $lang : string|null
- $loadGenerated : bool
- $mandatorySettings : array<string|int, mixed>
- $moFiles : array<string|int, mixed>
- $paths : array<string|int, mixed>
- $settings : array<string|int, mixed>
- $settingsPath : string
- $setupPath : string
- $signKeys : array<string|int, string>
- $siteKey : string
- $srcPath : string
- $syncUsers : bool
- $templateCompilePath : string
- $fields : mixed
- $sorted : mixed
- $values : mixed
Methods
- __construct() : mixed
- __get() : mixed
- __isset() : mixed
- __set() : mixed
- __unset() : mixed
- addField() : $this
- getField() : mixed|null
- getFields() : mixed
- getValues() : mixed
- setField() : mixed
- setValues() : $this
- Set the values of multiple fields.
Properties
$cms
public
string
$cms
Ex: 'Backdrop', 'Drupal', 'Drupal8', 'Joomla', 'WordPress'.
$cmsBaseUrl
public
string
$cmsBaseUrl
Ex: 'http://example.org/'.
$cmsDb
public
array<string|int, mixed>
$cmsDb
Ex: ['server'=>'localhost:3306', 'username'=>'admin', 'password'=>'s3cr3t', 'database'=>'mydb']
$components
public
array<string|int, mixed>
$components
Ex: ['CiviMail', 'CiviContribute', 'CiviEvent', 'CiviMember', 'CiviReport']
$credKeys
public
array<string|int, string>
$credKeys
Ex: ['::abcd1234ABCD9876'].
$db
public
array<string|int, mixed>
$db
Ex: ['server'=>'localhost:3306', 'username'=>'admin', 'password'=>'s3cr3t', 'database'=>'mydb']
$deployID
public
string
$deployID
Ex: '1234ABCD9876'.
$extensions
public
array<string|int, mixed>
$extensions
Ex: ['org.civicrm.flexmailer', 'org.civicrm.shoreditch'].
$extras
public
array<string|int, mixed>
$extras
Open-ended list of private, adhoc fields/flags/tags. Keys should be prefixed based on which plugin manages the field. Values must only be scalars (bool/int/string) and arrays. Ex: ['opt-in.version-check' => TRUE].
$lang
public
string|null
$lang
The language of the default dataset. Ex: 'fr_FR'.
$loadGenerated
public
bool
$loadGenerated
UNSUPPORTED: Load example dataset (in lieu of the standard dataset). This was copied-in from the previous installer code, but it should probably be reconceived.
$mandatorySettings
public
array<string|int, mixed>
$mandatorySettings
List of hard-coded setting-overrides. These are mandatory settings which are hard-coded into the config file. Changing requires editing the file. This makes sense for path/URL settings that are generally system-local and not migrated between dev/prod/etc. Ex: ['ajaxPopupsEnabled' => 0].
$moFiles
public
array<string|int, mixed>
$moFiles
Open-ended list translations files which should be downloaded. Each entry is a url of an mo-file. Provide each entry with en_US langugae code. That code will be replaced with the actual language. The default is: ['https://download.civicrm.org/civicrm-l10n-core/mo/en_US/civicrm.mo']
$paths
public
array<string|int, mixed>
$paths
List of hard-coded path-overrides. Ex: ['wp.frontend.base'=>['url'=>'http://example.org/']].
$settings
public
array<string|int, mixed>
$settings
List of domain settings to apply. These are defaults during installation; they could be changed by the admin post-install via GUI or API. Ex: ['ajaxPopupsEnabled' => 0].
$settingsPath
public
string
$settingsPath
Ex: '/var/www/sites/default/civicrm.settings.php'.
$setupPath
public
string
$setupPath
Path to CiviCRM-setup source tree. Ex: '/var/www/sites/all/modules/civicrm/setup'.
$signKeys
public
array<string|int, string>
$signKeys
Ex: ['jwt-hs256::abcd1234ABCD9876'].
$siteKey
public
string
$siteKey
Ex: 'abcd1234ABCD9876'.
$srcPath
public
string
$srcPath
Path to CiviCRM-core source tree. Ex: '/var/www/sites/all/modules/civicrm'.
$syncUsers
public
bool
$syncUsers
Whether to automatically create Contact
records for each pre-existing CMS User
$templateCompilePath
public
string
$templateCompilePath
Ex: '/var/www/sites/default/files/civicrm/templates_c'.
$fields
protected
mixed
$fields
= array()
$sorted
protected
mixed
$sorted
= FALSE
$values
protected
mixed
$values
= array()
Methods
__construct()
public
__construct() : mixed
__get()
public
& __get(mixed $name) : mixed
Parameters
- $name : mixed
__isset()
public
__isset(mixed $name) : mixed
Parameters
- $name : mixed
__set()
public
__set(mixed $name, mixed $value) : mixed
Parameters
- $name : mixed
- $value : mixed
__unset()
public
__unset(mixed $name) : mixed
Parameters
- $name : mixed
addField()
public
addField(array<string|int, mixed> $field) : $this
Parameters
- $field : array<string|int, mixed>
-
- name: string
- description: string
- type: string. One of "checkbox", "string".
- weight: int. (Default: 0)
- visible: bool. (Default: TRUE)
- value: mixed. (Default: NULL)
Return values
$thisgetField()
public
getField(string $field[, string $property = NULL ]) : mixed|null
Parameters
- $field : string
-
The name of the field. Ex: 'cmsDb', 'lang'.
- $property : string = NULL
-
A specific property of the field to load. Ex: 'name', 'description', 'type', 'options'.
Return values
mixed|nullgetFields()
public
getFields() : mixed
getValues()
public
getValues() : mixed
setField()
public
setField(mixed $field, mixed $property, mixed $value) : mixed
Parameters
- $field : mixed
- $property : mixed
- $value : mixed
setValues()
Set the values of multiple fields.
public
setValues(array<string|int, mixed> $values) : $this
Parameters
- $values : array<string|int, mixed>
-
Ex: array('root' => '/var/www/sites/default/files/civicrm')