class CRM_Core_Component_Info

This interface defines methods that need to be implemented for a component to introduce itself to the system.

Constants

COMPONENT_INVOKE_CLASS

Name of the class (minus component namespace path) of the component invocation class'es name.

COMPONENT_BAO_QUERY_CLASS

Name of the class (minus component namespace path) of the component BAO Query class'es name.

COMPONENT_USERDASHBOARD_CLASS

Name of the class (minus component namespace path) of the component user dashboard plugin.

COMPONENT_TAB_CLASS

Name of the class (minus component namespace path) of the component tab offered to contact record view.

COMPONENT_ADVSEARCHPANE_CLASS

Name of the class (minus component namespace path) of the component tab offered to contact record view.

COMPONENT_XML_RESOURCES

Name of the directory (assumed in component directory) where xml resources used by this component live.

COMPONENT_MENU_XML

Name of the directory (assumed in xml resources path) containing component menu definition XML file names.

Properties

array $info Stores component information.
protected string $keyword Stores component keyword.

Methods

__construct(string $name, string $namespace, int $componentID)

No description

array
getAngularModules()

EXPERIMENTAL: Get a list of AngularJS modules

array
getInfo()

Provides base information about the component.

array
getManagedEntities()

Get a list of entities to register via API.

array
getAnonymousPermissionWarnings()

Provides permissions that are unwise for Anonymous Roles to have.

array|null
getPermissions(bool $getAllUnconditionally = FALSE)

Provides permissions that are used by component.

array
getReferenceCounts(CRM_Core_DAO $dao)

Determine how many other records refer to a given record.

array|null
getUserDashboardElement()

Provides information about user dashboard element.

array|null
registerTab()

Provides information about user dashboard element.

array|null
registerAdvancedSearchPane()

Provides information about advanced search pane offered by this component.

array|null
getActivityTypes()

Provides potential activity types that this component might want to register in activity history.

bool
isEnabled()

Provides information whether given component is currently marked as enabled in configuration.

mixed
getMenuObject()

Provides component's menu definition object.

mixed
getInvokeObject()

Provides component's invocation object.

mixed
getBAOQueryObject()

Provides component's BAO Query object.

buildAdvancedSearchPaneForm(CRM_Core_Form $form)

Builds advanced search form's component specific pane.

mixed
getUserDashboardObject()

Provides component's user dashboard page object.

mixed
getTabObject()

Provides component's contact record tab object.

string
getAdvancedSearchPaneTemplatePath()

Provides component's advanced search pane's template path.

bool
usesSearch()

Provides information whether given component uses system wide search.

array
menuFiles()

Provides the xml menu files.

string
getKeyword()

Simple "keyword" getter.

Details

at line 100
__construct(string $name, string $namespace, int $componentID)

Parameters

string $name Name of the component.
string $namespace Namespace prefix for component's files.
int $componentID

at line 115
array getAngularModules()

EXPERIMENTAL: Get a list of AngularJS modules

Return Value

array list of modules; same format as CRM_Utils_Hook::angularModules(&$angularModules)

See also

CRM_Utils_Hook::angularModules

at line 127
abstract array getInfo()

Provides base information about the component.

Needs to be implemented in component's information class.

Return Value

array collection of required component settings

at line 136
array getManagedEntities()

Get a list of entities to register via API.

Return Value

array list of entities; same format as CRM_Utils_Hook::managedEntities(&$entities)

See also

CRM_Utils_Hook::managedEntities

at line 147
array getAnonymousPermissionWarnings()

Provides permissions that are unwise for Anonymous Roles to have.

Return Value

array list of permissions

See also

CRM_Component_Info::getPermissions

at line 164
abstract array|null getPermissions(bool $getAllUnconditionally = FALSE)

Provides permissions that are used by component.

Needs to be implemented in component's information class.

NOTE: if using conditionally permission return, implementation of $getAllUnconditionally is required.

Parameters

bool $getAllUnconditionally

Return Value

array|null collection of permissions, null if none

at line 177
array getReferenceCounts(CRM_Core_DAO $dao)

Determine how many other records refer to a given record.

Parameters

CRM_Core_DAO $dao The item for which we want a reference count.

Return Value

array each item in the array is an array with keys: - name: string, eg "sql:civicrm_email:contact_id" - type: string, eg "sql" - count: int, eg "5" if there are 5 email addresses that refer to $dao

at line 189
abstract array|null getUserDashboardElement()

Provides information about user dashboard element.

offered by this component.

Return Value

array|null collection of required dashboard settings, null if no element offered

at line 199
abstract array|null registerTab()

Provides information about user dashboard element.

offered by this component.

Return Value

array|null collection of required dashboard settings, null if no element offered

at line 209
abstract array|null registerAdvancedSearchPane()

Provides information about advanced search pane offered by this component.

Return Value

array|null collection of required pane settings, null if no element offered

at line 220
abstract array|null getActivityTypes()

Provides potential activity types that this component might want to register in activity history.

Needs to be implemented in component's information class.

Return Value

array|null collection of activity types

at line 229
bool isEnabled()

Provides information whether given component is currently marked as enabled in configuration.

Return Value

bool true if component is enabled, false if not

at line 243
mixed getMenuObject()

Provides component's menu definition object.

Return Value

mixed component's menu definition object

at line 253
mixed getInvokeObject()

Provides component's invocation object.

Return Value

mixed component's invocation object

at line 263
mixed getBAOQueryObject()

Provides component's BAO Query object.

Return Value

mixed component's BAO Query object

at line 272
buildAdvancedSearchPaneForm(CRM_Core_Form $form)

Builds advanced search form's component specific pane.

Parameters

CRM_Core_Form $form

at line 283
mixed getUserDashboardObject()

Provides component's user dashboard page object.

Return Value

mixed component's User Dashboard applet object

at line 293
mixed getTabObject()

Provides component's contact record tab object.

Return Value

mixed component's contact record tab object

at line 303
string getAdvancedSearchPaneTemplatePath()

Provides component's advanced search pane's template path.

Return Value

string component's advanced search pane's template path

at line 314
bool usesSearch()

Provides information whether given component uses system wide search.

Return Value

bool true if component needs search integration

at line 324
array menuFiles()

Provides the xml menu files.

Return Value

array array of menu files

at line 336
string getKeyword()

Simple "keyword" getter.

FIXME: It should be protected so the keyword is not FIXME: accessed from beyond component infrastructure.

Return Value

string component keyword