Documentation

CRM_Core_Component
in package

Component stores all the static and dynamic information of the various CiviCRM components

Tags
copyright

CiviCRM LLC https://civicrm.org/licensing

Table of Contents

Constants

COMPONENT_INFO_CLASS  = 'Info'
End part (filename) of the component information class'es name that needs to be present in components main directory.

Methods

alterQuery()  : mixed
buildSearchForm()  : mixed
contactSubTypeProperties()  : null|string
Unused function.
contactSubTypes()  : array<string|int, mixed>|null
Unused function.
defaultReturnProperties()  : null
from()  : null
get()  : mixed
getComponentID()  : int|null
getComponentIDs()  : array<string|int, mixed>
getComponentName()  : string|null
getComponents()  : array<string|int, CRM_Core_Component_Info>
getComponentsFromFile()  : array<string|int, mixed>
Get components info from info file.
getEnabledComponents()  : array<string|int, CRM_Core_Component_Info>
getNames()  : array<string|int, mixed>
getQueryFields()  : array<string|int, mixed>
invoke()  : bool
isEnabled()  : bool
Is the specified component enabled.
isIdEnabled()  : bool
postToggleComponents()  : void
Callback for the "enable_components" setting (post change)
preToggleComponents()  : void
Callback for the "enable_components" setting (pre change)
searchAction()  : mixed
tableNames()  : mixed
Handle table dependencies of components.
xmlMenu()  : array<string|int, mixed>
Get menu files from all components
_info()  : array<string|int, CRM_Core_Component_Info>

Constants

COMPONENT_INFO_CLASS

End part (filename) of the component information class'es name that needs to be present in components main directory.

public mixed COMPONENT_INFO_CLASS = 'Info'

Methods

alterQuery()

public static alterQuery(mixed &$query, string $fnName) : mixed
Parameters
$query : mixed
$fnName : string

contactSubTypeProperties()

Unused function.

public static contactSubTypeProperties(string $subType, string $op) : null|string
Parameters
$subType : string
$op : string
Return values
null|string

contactSubTypes()

Unused function.

public static contactSubTypes() : array<string|int, mixed>|null
Return values
array<string|int, mixed>|null

defaultReturnProperties()

public static & defaultReturnProperties(mixed $mode[, bool $includeCustomFields = TRUE ]) : null
Parameters
$mode : mixed
$includeCustomFields : bool = TRUE
Return values
null

from()

public static from(string $fieldName, mixed $mode, mixed $side) : null
Parameters
$fieldName : string
$mode : mixed
$side : mixed
Return values
null

get()

public static get(string $name[, null $attribute = NULL ]) : mixed
Parameters
$name : string
$attribute : null = NULL

getComponentID()

public static getComponentID(string $componentName) : int|null
Parameters
$componentName : string
Return values
int|null

getComponentIDs()

public static & getComponentIDs() : array<string|int, mixed>
Return values
array<string|int, mixed>

Array(string $name => int $id).

getComponentName()

public static getComponentName(int $componentID) : string|null
Parameters
$componentID : int
Return values
string|null

getComponentsFromFile()

Get components info from info file.

public static getComponentsFromFile(string $crmFolderDir) : array<string|int, mixed>
Parameters
$crmFolderDir : string
Return values
array<string|int, mixed>

getNames()

public static & getNames([bool $translated = FALSE ]) : array<string|int, mixed>
Parameters
$translated : bool = FALSE
Return values
array<string|int, mixed>

getQueryFields()

public static & getQueryFields([mixed $checkPermission = TRUE ]) : array<string|int, mixed>
Parameters
$checkPermission : mixed = TRUE
Return values
array<string|int, mixed>

invoke()

public static invoke(mixed &$args, mixed $type) : bool
Parameters
$args : mixed
$type : mixed
Return values
bool

isEnabled()

Is the specified component enabled.

public static isEnabled(string $component) : bool
Parameters
$component : string

Component name - ie CiviMember, CiviContribute, CiviEvent...

Return values
bool

Is the component enabled.

isIdEnabled()

public static isIdEnabled(int $id) : bool
Parameters
$id : int
Return values
bool

postToggleComponents()

Callback for the "enable_components" setting (post change)

public static postToggleComponents(array<string|int, mixed> $oldValue, array<string|int, mixed> $newValue) : void

When a component is enabled or disabled, ensure the corresponding module-extension is also enabled/disabled.

Parameters
$oldValue : array<string|int, mixed>

List of component names.

$newValue : array<string|int, mixed>

List of component names.

Tags
throws
CRM_Core_Exception

preToggleComponents()

Callback for the "enable_components" setting (pre change)

public static preToggleComponents(array<string|int, mixed> $oldValue, array<string|int, mixed> $newValue) : void

Before a component is disabled, disable reverse-dependencies (all extensions dependent on it).

This is imperfect because it only goes one-level deep: it doesn't deal with any extensions that depend on the ones being disabled. The proper fix for that would probably be something like a CASCADE mode for disabling an extension with all its reverse dependencies (which would render this function moot).

Parameters
$oldValue : array<string|int, mixed>

List of component names.

$newValue : array<string|int, mixed>

List of component names.

Tags
throws
CRM_Core_Exception

searchAction()

public static searchAction(mixed &$row, int $id) : mixed
Parameters
$row : mixed
$id : int

tableNames()

Handle table dependencies of components.

public static tableNames(array<string|int, mixed> &$tables) : mixed
Parameters
$tables : array<string|int, mixed>

Array of tables.

xmlMenu()

Get menu files from all components

public static xmlMenu() : array<string|int, mixed>
Return values
array<string|int, mixed>

        
On this page

Search results