CRM_Case_Info
extends CRM_Core_Component_Info
in package
This class introduces component to the system and provides all the information about it. It needs to extend CRM_Core_Component_Info abstract class.
Tags
Table of Contents
Constants
- COMPONENT_ADVSEARCHPANE_CLASS = 'Form_Search_AdvancedSearchPane'
- Name of the class (minus component namespace path) of the component tab offered to contact record view.
- COMPONENT_BAO_QUERY_CLASS = 'BAO_Query'
- Name of the class (minus component namespace path) of the component BAO Query class'es name.
- COMPONENT_INVOKE_CLASS = 'Invoke'
- Name of the class (minus component namespace path) of the component invocation class'es name.
- COMPONENT_MENU_XML = 'Menu'
- Name of the directory (assumed in xml resources path) containing component menu definition XML file names.
- COMPONENT_TAB_CLASS = 'Page_Tab'
- Name of the class (minus component namespace path) of the component tab offered to contact record view.
- COMPONENT_USERDASHBOARD_CLASS = 'Page_UserDashboard'
- Name of the class (minus component namespace path) of the component user dashboard plugin.
- COMPONENT_XML_RESOURCES = 'xml'
- Name of the directory (assumed in component directory) where xml resources used by this component live.
Properties
- $componentID : int
- Component ID
- $info : array{name: string, translatedName: string, title: string, search: bool, showActivitiesInCore: bool, url: string}
- Component settings as key/value pairs.
- $name : string
- Component Name.
- $namespace : string
- Component namespace.
- $keyword : string
- Component keyword.
Methods
- __construct() : mixed
- buildAdvancedSearchPaneForm() : mixed
- Builds advanced search form's component specific pane.
- creatNewShortcut() : mixed
- add shortcut to Create New.
- getActivityTypes() : null
- Provides potential activity types that this component might want to register in activity history.
- getAdvancedSearchPaneTemplatePath() : string
- Provides component's advanced search pane's template path.
- getAnonymousPermissionWarnings() : array<string|int, mixed>
- Provides permissions that are unwise for Anonymous Roles to have.
- getBAOQueryObject() : mixed
- Provides component's BAO Query object.
- getExtensionName() : string
- Name of the module-extension coupled with this component
- getIcon() : string
- Get icon font class representing this component.
- getInfo() : array<string|int, mixed>
- Provides base information about the component.
- getInvokeObject() : mixed
- Provides component's invocation object.
- getKeyword() : string
- Simple "keyword" getter.
- getMultiClientOptions() : array<string|int, mixed>
- getPermissions() : array<string|int, mixed>
- Defines permissions that are used by component.
- getRedactOptions() : array<string|int, mixed>
- getReferenceCounts() : array<string|int, mixed>
- Determine how many other records refer to a given record.
- getSortOptions() : array<string|int, mixed>
- getTabObject() : mixed
- Provides component's contact record tab object.
- getUserDashboardElement() : array<string|int, mixed>
- Provides information about user dashboard element.
- getUserDashboardObject() : mixed
- Provides component's user dashboard page object.
- isEnabled() : bool
- Provides information whether given component is currently marked as enabled in configuration.
- loadCaseSampleData() : mixed
- Load case sample data.
- menuFiles() : array<string|int, mixed>
- Provides the xml menu files.
- onToggleComponents() : mixed
- (Setting Callback) Respond to changes in the "enable_components" setting
- registerAdvancedSearchPane() : array<string|int, mixed>
- Provides information about advanced search pane offered by this component.
- registerTab() : array<string|int, mixed>
- Provides information about user dashboard element.
- usesSearch() : bool
- Provides information whether given component uses system wide search.
- _getMenuXMLPath() : mixed
- Helper for figuring out menu XML file location.
- _instantiate() : mixed
- Helper for instantiating component's elements.
Constants
COMPONENT_ADVSEARCHPANE_CLASS
Name of the class (minus component namespace path) of the component tab offered to contact record view.
public
mixed
COMPONENT_ADVSEARCHPANE_CLASS
= 'Form_Search_AdvancedSearchPane'
COMPONENT_BAO_QUERY_CLASS
Name of the class (minus component namespace path) of the component BAO Query class'es name.
public
mixed
COMPONENT_BAO_QUERY_CLASS
= 'BAO_Query'
COMPONENT_INVOKE_CLASS
Name of the class (minus component namespace path) of the component invocation class'es name.
public
mixed
COMPONENT_INVOKE_CLASS
= 'Invoke'
COMPONENT_MENU_XML
Name of the directory (assumed in xml resources path) containing component menu definition XML file names.
public
mixed
COMPONENT_MENU_XML
= 'Menu'
COMPONENT_TAB_CLASS
Name of the class (minus component namespace path) of the component tab offered to contact record view.
public
mixed
COMPONENT_TAB_CLASS
= 'Page_Tab'
COMPONENT_USERDASHBOARD_CLASS
Name of the class (minus component namespace path) of the component user dashboard plugin.
public
mixed
COMPONENT_USERDASHBOARD_CLASS
= 'Page_UserDashboard'
COMPONENT_XML_RESOURCES
Name of the directory (assumed in component directory) where xml resources used by this component live.
public
mixed
COMPONENT_XML_RESOURCES
= 'xml'
Properties
$componentID
Component ID
public
int
$componentID
$info
Component settings as key/value pairs.
public
array{name: string, translatedName: string, title: string, search: bool, showActivitiesInCore: bool, url: string}
$info
$name
Component Name.
public
string
$name
$namespace
Component namespace.
public
string
$namespace
e.g. CRM_Contribute.
$keyword
Component keyword.
protected
string
$keyword
= 'case'
Tags
Methods
__construct()
public
__construct(string $name, string $namespace, int $componentID) : mixed
Parameters
- $name : string
-
Name of the component.
- $namespace : string
-
Namespace prefix for component's files.
- $componentID : int
buildAdvancedSearchPaneForm()
Builds advanced search form's component specific pane.
public
buildAdvancedSearchPaneForm(CRM_Core_Form &$form) : mixed
Parameters
- $form : CRM_Core_Form
creatNewShortcut()
add shortcut to Create New.
public
creatNewShortcut(array<string|int, mixed> &$shortCuts) : mixed
Parameters
- $shortCuts : array<string|int, mixed>
getActivityTypes()
Provides potential activity types that this component might want to register in activity history.
public
getActivityTypes() : null
Tags
Return values
nullgetAdvancedSearchPaneTemplatePath()
Provides component's advanced search pane's template path.
public
getAdvancedSearchPaneTemplatePath() : string
Return values
string —component's advanced search pane's template path
getAnonymousPermissionWarnings()
Provides permissions that are unwise for Anonymous Roles to have.
public
getAnonymousPermissionWarnings() : array<string|int, mixed>
Tags
Return values
array<string|int, mixed> —list of permissions
getBAOQueryObject()
Provides component's BAO Query object.
public
getBAOQueryObject() : mixed
Return values
mixed —component's BAO Query object
getExtensionName()
Name of the module-extension coupled with this component
public
getExtensionName() : string
Return values
stringgetIcon()
Get icon font class representing this component.
public
getIcon() : string
Tags
Return values
stringgetInfo()
Provides base information about the component.
public
getInfo() : array<string|int, mixed>
Tags
Return values
array<string|int, mixed>getInvokeObject()
Provides component's invocation object.
public
getInvokeObject() : mixed
Return values
mixed —component's invocation object
getKeyword()
Simple "keyword" getter.
public
getKeyword() : string
FIXME: It should be protected so the keyword is not FIXME: accessed from beyond component infrastructure.
Return values
string —component keyword
getMultiClientOptions()
public
static getMultiClientOptions() : array<string|int, mixed>
Return values
array<string|int, mixed> —Array(string $value => string $label).
getPermissions()
Defines permissions that are used by component.
public
getPermissions() : array<string|int, mixed>
Tags
Return values
array<string|int, mixed>getRedactOptions()
public
static getRedactOptions() : array<string|int, mixed>
Return values
array<string|int, mixed> —Array(string $value => string $label).
getReferenceCounts()
Determine how many other records refer to a given record.
public
getReferenceCounts(mixed $dao) : array<string|int, mixed>
Parameters
- $dao : mixed
-
The item for which we want a reference count.
Tags
Return values
array<string|int, mixed> —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
getSortOptions()
public
static getSortOptions() : array<string|int, mixed>
Return values
array<string|int, mixed> —Array(string $value => string $label).
getTabObject()
Provides component's contact record tab object.
public
getTabObject() : mixed
Return values
mixed —component's contact record tab object
getUserDashboardElement()
Provides information about user dashboard element.
public
getUserDashboardElement() : array<string|int, mixed>
Tags
Return values
array<string|int, mixed>getUserDashboardObject()
Provides component's user dashboard page object.
public
getUserDashboardObject() : mixed
Return values
mixed —component's User Dashboard applet object
isEnabled()
Provides information whether given component is currently marked as enabled in configuration.
public
isEnabled() : bool
Return values
bool —true if component is enabled, false if not
loadCaseSampleData()
Load case sample data.
public
static loadCaseSampleData(string $fileName[, bool $lineMode = FALSE ]) : mixed
Parameters
- $fileName : string
- $lineMode : bool = FALSE
menuFiles()
Provides the xml menu files.
public
menuFiles() : array<string|int, mixed>
Return values
array<string|int, mixed> —array of menu files
onToggleComponents()
(Setting Callback) Respond to changes in the "enable_components" setting
public
static onToggleComponents(array<string|int, mixed> $oldValue, array<string|int, mixed> $newValue, array<string|int, mixed> $metadata) : mixed
If CiviCase is being enabled, load the case related sample data
Parameters
- $oldValue : array<string|int, mixed>
-
List of component names.
- $newValue : array<string|int, mixed>
-
List of component names.
- $metadata : array<string|int, mixed>
-
Specification of the setting (per *.settings.php).
Tags
registerAdvancedSearchPane()
Provides information about advanced search pane offered by this component.
public
registerAdvancedSearchPane() : array<string|int, mixed>
Tags
Return values
array<string|int, mixed>registerTab()
Provides information about user dashboard element.
public
registerTab() : array<string|int, mixed>
Tags
Return values
array<string|int, mixed>usesSearch()
Provides information whether given component uses system wide search.
public
usesSearch() : bool
Return values
bool —true if component needs search integration
_getMenuXMLPath()
Helper for figuring out menu XML file location.
private
_getMenuXMLPath() : mixed
Return values
mixed —component's element as class instance
_instantiate()
Helper for instantiating component's elements.
private
_instantiate(string $cl) : mixed
Parameters
- $cl : string
Return values
mixed —component's element as class instance