class CRM_Utils_Hook_Joomla extends CRM_Utils_Hook

Constants

DASHBOARD_BELOW

DASHBOARD_ABOVE

DASHBOARD_REPLACE

SUMMARY_BELOW

SUMMARY_ABOVE

SUMMARY_REPLACE

Properties

static $_nullObject from CRM_Utils_Hook
protected CRM_Utils_Cache_Interface $cache from CRM_Utils_Hook

Methods

static CRM_Utils_Hook
singleton(bool $fresh = FALSE)

Constructor and getter for the singleton instance.

__construct()

CRM_Utils_Hook constructor.

mixed
invokeViaUF(int $numParams, mixed $arg1, mixed $arg2, mixed $arg3, mixed $arg4, mixed $arg5, mixed $arg6, string $fnSuffix)

No description

mixed
invoke(array|int $names, mixed $arg1, mixed $arg2, mixed $arg3, mixed $arg4, mixed $arg5, mixed $arg6, mixed $fnSuffix)

Invoke a hook.

array|bool
commonInvoke(array $numParams, $arg1, $arg2, $arg3, $arg4, $arg5, $arg6, $fnSuffix, $fnPrefix)

No description

commonBuildModuleList(string $fnPrefix)

Build the list of modules to be processed for hooks.

array|bool
runHooks($civiModules, $fnSuffix, array $numParams, $arg1, $arg2, $arg3, $arg4, $arg5, $arg6)

No description

requireCiviModules($moduleList)

No description

static null
pre(string $op, string $objectName, int $id, array $params)

This hook is called before a db write on some core objects.

static mixed
post(string $op, string $objectName, int $objectId, object $objectRef = NULL)

This hook is called after a db write on some core objects.

static null
links(string $op, string $objectName, int $objectId, array $links, int $mask = NULL, array $values = array())

This hook retrieves links from other modules and injects it into.

static null
preProcess(string $formName, CRM_Core_Form $form)

This hook is invoked during the CiviCRM form preProcess phase.

static null
buildForm(string $formName, CRM_Core_Form $form)

This hook is invoked when building a CiviCRM form. This hook should also be used to set the default values of a form element

static null
postProcess(string $formName, CRM_Core_Form $form)

This hook is invoked when a CiviCRM form is submitted. If the module has injected any form elements, this hook should save the values in the database

static mixed
validateForm(string $formName, array $fields, array $files, array $form, array $errors)

This hook is invoked during all CiviCRM form validation. An array of errors detected is returned. Else we assume validation succeeded.

static null
custom(string $op, string $groupID, object $entityID, array $params)

This hook is called after a db write on a custom table.

static null
aclWhereClause(int $type, array $tables, array $whereTables, int $contactID, string $where)

This hook is called when composing the ACL where clause to restrict visibility of contacts to the logged in user

static null
aclGroup(int $type, int $contactID, string $tableName, array $allGroups, array $currentGroups)

This hook is called when composing the ACL where clause to restrict visibility of contacts to the logged in user

static mixed
selectWhereClause(string|CRM_Core_DAO $entity, array $clauses)

No description

static null
xmlMenu(array $files)

This hook is called when building the menu table.

static null
alterMenu(array $items)

(Experimental) This hook is called when build the menu table.

static null
managed(array $entities)

This hook is called for declaring managed entities via API.

static string
dashboard(int $contactID, int $contentPlacement = self::DASHBOARD_BELOW)

This hook is called when rendering the dashboard (q=civicrm/dashboard)

static array
recent(array $recentArray)

This hook is called before storing recently viewed items.

static mixed
referenceCounts(CRM_Core_DAO $dao, array $refCounts)

Determine how many other records refer to a given record.

static null
buildAmount(int $pageType, CRM_Core_Form $form, array $amount)

This hook is called when building the amount structure for a Contribution or Event Page.

static null
buildStateProvinceForCountry(array $countryID, $states)

This hook is called when building the state list for a particular country.

static null
tabs(array $tabs, int $contactID) deprecated

This hook is called when rendering the tabs for a contact (q=civicrm/contact/view)c

static null
tabset(string $tabsetName, array $tabs, array $context)

This hook is called when rendering the tabs used for events and potentially contribution pages, etc.

static null
tokens(array $tokens)

This hook is called when sending an email / printing labels

static null
tokenValues(array $details, array $contactIDs, int $jobID = NULL, array $tokens = array(), string $className = NULL)

This hook is called when sending an email / printing labels to get the values for all the tokens returned by the 'tokens' hook

static null
pageRun(object $page)

This hook is called before a CiviCRM Page is rendered. You can use this hook to insert smarty variables in a template

static null
copy(string $objectName, object $object)

This hook is called after a copy of an object has been made. The current objects are Event, Contribution Page and UFGroup

static mixed
unsubscribeGroups(string $op, int $mailingId, int $contactId, array|int $groups, array|int $baseGroups)

This hook is called when a contact unsubscribes from a mailing. It allows modules to override what the contacts are removed from.

static mixed
customFieldOptions(int $customFieldID, array $options, bool $detailedFormat = FALSE, array $selectAttributes = array()) deprecated

This hook is called when CiviCRM needs to edit/display a custom field with options

static mixed
fieldOptions(string $entity, string $field, array $options, array $params)

Hook for modifying field options

static mixed
searchTasks(string $objectType, array $tasks)

This hook is called to display the list of actions allowed after doing a search.

static mixed
eventDiscount(mixed $form, array $params)

No description

static mixed
mailingGroups(mixed $form, array $groups, array $mailings)

This hook is called when composing a mailing. You can include / exclude other groups as needed.

static mixed
mailingTemplateTypes(array $types)

(Experimental) Modify the list of template-types used for CiviMail composition.

static mixed
membershipTypeValues(mixed $form, array $membershipTypes)

This hook is called when composing the array of membershipTypes and their cost during a membership registration (new or renewal).

static string
summary(int $contactID, mixed $content, int $contentPlacement = self::SUMMARY_BELOW)

This hook is called when rendering the contact summary.

static mixed
contactListQuery(mixed $query, string $queryText, string $context, int $id)

Use this hook to populate the list of contacts returned by Contact Reference custom fields.

static mixed
alterPaymentProcessorParams(CRM_Core_Payment $paymentObj, array $rawParams, array $cookedParams)

Hook definition for altering payment parameters before talking to a payment processor back end.

static mixed
alterMailParams(array $params, string $context = NULL)

This hook is called when an email is about to be sent by CiviCRM.

static mixed
alterCalculatedMembershipStatus(array $membershipStatus, array $arguments, array $membership)

This hook is called when membership status is being calculated.

static mixed
alterMailContent(array $content)

This hook is called after getting the content of the mail and before tokenizing it.

static array
caseSummary(int $caseID)

This hook is called when rendering the Manage Case screen.

static mixed
caseTypes(array $caseTypes)

This hook is called when locating CiviCase types.

static mixed
config(CRM_Core_Config|array $config)

This hook is called soon after the CRM_Core_Config object has ben initialized.

static mixed
optionValues(array $options, string $groupName) deprecated

This hooks allows to change option values.

static mixed
navigationMenu(array $params)

This hook allows modification of the navigation menu.

static mixed
merge(string $type, array $data, int $mainId = NULL, int $otherId = NULL, array $tables = NULL)

This hook allows modification of the data used to perform merging of duplicates.

static mixed
alterLocationMergeData(array $blocksDAO, int $mainId, int $otherId, array $migrationInfo)

This hook allows modification of the data calculated for merging locations.

static mixed
notePrivacy(array $noteValues)

This hook provides a way to override the default privacy behavior for notes.

static mixed
export(string $exportTempTable, array $headerRows, array $sqlColumns, int $exportMode)

This hook is called before record is exported as CSV.

static mixed
dupeQuery(string $obj, string $type, array $query)

This hook allows modification of the queries constructed from dupe rules.

static mixed
emailProcessor(string $type, array $params, object $mail, array $result, string $action = NULL)

This hook is called AFTER EACH email has been processed by the script bin/EmailProcessor.php

static mixed
import(string $object, string $usage, string $objectRef, array $params)

This hook is called after a row has been processed and the record (and associated records imported

static mixed
alterAPIPermissions(string $entity, string $action, array $params, array $permissions)

This hook is called when API permissions are checked (cf. civicrm_api3_api_check_permission() in api/v3/utils.php and _civicrm_api3_permissions() in CRM/Core/DAO/permissions.php).

static mixed
postSave(CRM_Core_DAO $dao)

No description

static mixed
summaryActions(array $actions, int $contactID = NULL)

This hook allows user to customize context menu Actions on contact summary page.

static mixed
searchColumns(string $objectName, array $headers, array $rows, array $selector)

This hook is called from CRM_Core_Selector_Controller through which all searches in civicrm go.

static null
buildUFGroupsForModule(string $moduleName, array $ufGroups)

This hook is called when uf groups are being built for a module.

static null
emailProcessorContact(string $email, int $contactID, array $result)

This hook is called when we are determining the contactID for a specific email address

static mixed
alterMailingLabelParams(array $args)

Hook definition for altering the generation of Mailing Labels.

static mixed
alterContent($content, $context, $tplName, $object)

This hooks allows alteration of generated page content.

static mixed
alterTemplateFile($formName, $form, $context, $tplName)

This hooks allows alteration of the tpl file used to generate content. It differs from the altercontent hook as the content has already been rendered through the tpl at that point

static mixed
triggerInfo($info, string $tableName = NULL)

This hook collects the trigger definition from all components.

static mixed
alterLogTables(array $logTableSpec)

This hook allows changes to the spec of which tables to log.

static 
install()

This hook is called when a module-extension is installed.

static 
uninstall()

This hook is called when a module-extension is uninstalled.

static 
enable()

This hook is called when a module-extension is re-enabled.

static 
disable()

This hook is called when a module-extension is disabled.

static mixed
alterReportVar($varType, $var, $object)

No description

static bool|null
upgrade(string $op, $queue = NULL)

This hook is called to drive database upgrades for extension-modules.

static mixed
postEmailSend(array $params)

This hook is called when an email has been successfully sent by CiviCRM, but not on an error.

static mixed
postMailing(int $mailingId)

This hook is called when a CiviMail mailing has completed

static mixed
alterSettingsFolders(array $settingsFolders)

This hook is called when Settings specifications are loaded.

static mixed
alterSettingsMetaData(array $settingsMetaData, int $domainID, mixed $profile)

This hook is called when Settings have been loaded from the xml It is an opportunity for hooks to alter the data

static null
apiWrappers(API_Wrapper[] $wrappers, mixed $apiRequest)

This hook is called before running an api call.

static null
cron(CRM_Core_JobManager $jobManager)

This hook is called before running pending cron jobs.

static null
permission(array $permissions)

This hook is called when loading CMS permissions; use this hook to modify the array of system permissions for CiviCRM.

static null
permission_check(string $permission, bool $granted)

This hook is called when checking permissions; use this hook to dynamically escalate user permissions in certain use cases (cf. CRM-19256).

static 
unhandledException(CRM_Core_Exception $exception, mixed $request = NULL)

No description

static null
entityTypes(array[] $entityTypes)

This hook is called for declaring managed entities via API.

static 
eventDefs(CiviEventInspector $inspector)

Build a description of available hooks.

static mixed
buildProfile(string $profileName)

This hook is called while preparing a profile form.

static mixed
validateProfile(string $profileName)

This hook is called while validating a profile form submission.

static mixed
processProfile(string $profileName)

This hook is called processing a valid profile form submission.

static mixed
viewProfile(string $profileName)

This hook is called while preparing a read-only profile screen

static mixed
searchProfile(string $profileName)

This hook is called while preparing a list of contacts (based on a profile)

static null
alterBadge(string $labelName, object $label, array $format, array $participant)

This hook is invoked when building a CiviCRM name badge.

static mixed
alterBarcode(array $data, string $type = 'barcode', string $context = 'name_badge')

This hook is called before encoding data in barcode.

static mixed
alterMailer(object $mailer, string $driver, array $params)

Modify or replace the Mailer object used for outgoing mail.

static mixed
alterMail(object $mailer, string $driver, array $params) deprecated

Deprecated: Misnamed version of alterMailer(). Remove post-4.7.x.

static mixed
queryObjects(array $queryObjects, string $type = 'Contact')

This hook is called while building the core search query, so hook implementers can provide their own query objects which alters/extends core search.

static mixed
dashboard_defaults(array $availableDashlets, array $defaultDashlets)

This hook is called while viewing contact dashboard.

static mixed
pre_case_merge(int $mainContactId, int $mainCaseId = NULL, int $otherContactId = NULL, int $otherCaseId = NULL, bool $changeClient = FALSE)

This hook is called before a case merge (or a case reassign)

static mixed
post_case_merge(int $mainContactId, int $mainCaseId = NULL, int $otherContactId = NULL, int $otherCaseId = NULL, bool $changeClient = FALSE)

This hook is called after a case merge (or a case reassign)

static mixed
alterDisplayName(string $displayName, int $contactId, object $dao)

Issue CRM-14276 Add a hook for altering the display name

static null
angularModules(array $angularModules)

EXPERIMENTAL: This hook allows one to register additional Angular modules

static 
caseChange( $analyzer)

This hook fires whenever a record in a case changes.

static mixed
crudLink(array $spec, CRM_Core_DAO $bao, array $link)

Generate a default CRUD URL for an entity.

static 
container( $container)

Modify the CiviCRM container - add new services, parameters, extensions, etc.

static mixed
fileSearches(array $fileSearches)

No description

static mixed
check(array $messages)

Check system status.

static mixed
batchQuery(string $query)

This hook is called when a query string of the CSV Batch export is generated.

static mixed
alterDeferredRevenueItems(array $deferredRevenues, array $contributionDetails, bool $update, string $context)

This hook is called to alter Deferred revenue item values just before they are inserted in civicrm_financial_trxn table

static mixed
batchItems(array $results, array $items)

This hook is called when the entries of the CSV Batch export are mapped.

static 
coreResourceList(array $list, string $region)

This hook is called when core resources are being loaded

static 
entityRefFilters(array $filters)

Allows the list of filters on the EntityRef widget to be altered.

static mixed
idsException(array $skip)

This hook is called for bypass a few civicrm urls from IDS check.

static mixed
geocoderFormat(string $geoProvider, array $values, SimpleXMLElement $xml)

This hook is called when a geocoder's format method is called.

static mixed
inboundSMS(CRM_SMS_Message $message)

This hook is called before an inbound SMS is processed.

Details

in CRM_Utils_Hook at line 83
static CRM_Utils_Hook singleton(bool $fresh = FALSE)

Constructor and getter for the singleton instance.

Parameters

bool $fresh

Return Value

CRM_Utils_Hook An instance of $config->userHookClass

in CRM_Utils_Hook at line 95
__construct()

CRM_Utils_Hook constructor.

at line 68
mixed invokeViaUF(int $numParams, mixed $arg1, mixed $arg2, mixed $arg3, mixed $arg4, mixed $arg5, mixed $arg6, string $fnSuffix)

Parameters

int $numParams Number of parameters to pass to the hook.
mixed $arg1 Parameter to be passed to the hook.
mixed $arg2 Parameter to be passed to the hook.
mixed $arg3 Parameter to be passed to the hook.
mixed $arg4 Parameter to be passed to the hook.
mixed $arg5 Parameter to be passed to the hook.
mixed $arg6 Parameter to be passed to the hook.
string $fnSuffix Function suffix, this is effectively the hook name.

Return Value

mixed

in CRM_Utils_Hook at line 154
mixed invoke(array|int $names, mixed $arg1, mixed $arg2, mixed $arg3, mixed $arg4, mixed $arg5, mixed $arg6, mixed $fnSuffix)

Invoke a hook.

This is a transitional adapter. It supports the legacy syntax but also accepts enough information to support Symfony Event dispatching.

Parameters

array|int $names (Recommended) Array of parameter names, in order. Using an array is recommended because it enables full event-broadcasting behaviors. (Legacy) Number of parameters to pass to the hook. This is provided for transitional purposes.
mixed $arg1
mixed $arg2
mixed $arg3
mixed $arg4
mixed $arg5
mixed $arg6
mixed $fnSuffix

Return Value

mixed

in CRM_Utils_Hook at line 186
array|bool commonInvoke(array $numParams, $arg1, $arg2, $arg3, $arg4, $arg5, $arg6, $fnSuffix, $fnPrefix)

Parameters

array $numParams
$arg1
$arg2
$arg3
$arg4
$arg5
$arg6
$fnSuffix
$fnPrefix

Return Value

array|bool

in CRM_Utils_Hook at line 204
commonBuildModuleList(string $fnPrefix)

Build the list of modules to be processed for hooks.

Parameters

string $fnPrefix

in CRM_Utils_Hook at line 237
array|bool runHooks($civiModules, $fnSuffix, array $numParams, $arg1, $arg2, $arg3, $arg4, $arg5, $arg6)

Parameters

$civiModules
$fnSuffix
array $numParams
$arg1
$arg2
$arg3
$arg4
$arg5
$arg6

Return Value

array|bool

in CRM_Utils_Hook at line 310
requireCiviModules($moduleList)

Parameters

$moduleList

in CRM_Utils_Hook at line 341
static null pre(string $op, string $objectName, int $id, array $params)

This hook is called before a db write on some core objects.

This hook does not allow the abort of the operation

Parameters

string $op The type of operation being performed.
string $objectName The name of the object.
int $id The object id if available.
array $params The parameters used for object creation / editing.

Return Value

null the return value is ignored

in CRM_Utils_Hook at line 363
static mixed post(string $op, string $objectName, int $objectId, object $objectRef = NULL)

This hook is called after a db write on some core objects.

Parameters

string $op The type of operation being performed.
string $objectName The name of the object.
int $objectId The unique identifier for the object.
object $objectRef The reference to the object if available.

Return Value

mixed based on op. pre-hooks return a boolean or an error message which aborts the operation

This hook retrieves links from other modules and injects it into.

the view contact tabs

Parameters

string $op The type of operation being performed.
string $objectName The name of the object.
int $objectId The unique identifier for the object.
array $links (optional) the links array (introduced in v3.2).
int $mask (optional) the bitmask to show/hide links.
array $values (optional) the values to fill the links.

Return Value

null the return value is ignored

in CRM_Utils_Hook at line 404
static null preProcess(string $formName, CRM_Core_Form $form)

This hook is invoked during the CiviCRM form preProcess phase.

Parameters

string $formName The name of the form.
CRM_Core_Form $form Reference to the form object.

Return Value

null the return value is ignored

in CRM_Utils_Hook at line 421
static null buildForm(string $formName, CRM_Core_Form $form)

This hook is invoked when building a CiviCRM form. This hook should also be used to set the default values of a form element

Parameters

string $formName The name of the form.
CRM_Core_Form $form Reference to the form object.

Return Value

null the return value is ignored

in CRM_Utils_Hook at line 440
static null postProcess(string $formName, CRM_Core_Form $form)

This hook is invoked when a CiviCRM form is submitted. If the module has injected any form elements, this hook should save the values in the database

Parameters

string $formName The name of the form.
CRM_Core_Form $form Reference to the form object.

Return Value

null the return value is ignored

in CRM_Utils_Hook at line 462
static mixed validateForm(string $formName, array $fields, array $files, array $form, array $errors)

This hook is invoked during all CiviCRM form validation. An array of errors detected is returned. Else we assume validation succeeded.

Parameters

string $formName The name of the form.
array $fields &$fields the POST parameters as filtered by QF
array $files &$files the FILES parameters as sent in by POST
array $form &$form the form object
array $errors &$errors the array of errors.

Return Value

mixed formRule hooks return a boolean or an array of error messages which display a QF Error

in CRM_Utils_Hook at line 483
static null custom(string $op, string $groupID, object $entityID, array $params)

This hook is called after a db write on a custom table.

Parameters

string $op The type of operation being performed.
string $groupID The custom group ID.
object $entityID The entityID of the row in the custom table.
array $params The parameters that were sent into the calling function.

Return Value

null the return value is ignored

in CRM_Utils_Hook at line 506
static null aclWhereClause(int $type, array $tables, array $whereTables, int $contactID, string $where)

This hook is called when composing the ACL where clause to restrict visibility of contacts to the logged in user

Parameters

int $type The type of permission needed.
array $tables (reference ) add the tables that are needed for the select clause.
array $whereTables (reference ) add the tables that are needed for the where clause.
int $contactID The contactID for whom the check is made.
string $where The currrent where clause.

Return Value

null the return value is ignored

in CRM_Utils_Hook at line 529
static null aclGroup(int $type, int $contactID, string $tableName, array $allGroups, array $currentGroups)

This hook is called when composing the ACL where clause to restrict visibility of contacts to the logged in user

Parameters

int $type The type of permission needed.
int $contactID The contactID for whom the check is made.
string $tableName The tableName which is being permissioned.
array $allGroups The set of all the objects for the above table.
array $currentGroups The set of objects that are currently permissioned for this contact.

Return Value

null the return value is ignored

in CRM_Utils_Hook at line 539
static mixed selectWhereClause(string|CRM_Core_DAO $entity, array $clauses)

Parameters

string|CRM_Core_DAO $entity
array $clauses

Return Value

mixed

in CRM_Utils_Hook at line 556
static null xmlMenu(array $files)

This hook is called when building the menu table.

Parameters

array $files The current set of files to process.

Return Value

null the return value is ignored

in CRM_Utils_Hook at line 571
static null alterMenu(array $items)

(Experimental) This hook is called when build the menu table.

Parameters

array $items List of records to include in menu table.

Return Value

null the return value is ignored

in CRM_Utils_Hook at line 598
static null managed(array $entities)

This hook is called for declaring managed entities via API.

Parameters

array $entities List of pending entities. Each entity is an array with keys: + 'module': string; for module-extensions, this is the fully-qualifed name (e.g. "com.example.mymodule"); for CMS modules, the name is prefixed by the CMS (e.g. "drupal.mymodule") + 'name': string, a symbolic name which can be used to track this entity (Note: Each module creates its own namespace) + 'entity': string, an entity-type supported by the CiviCRM API (Note: this currently must be an entity which supports the 'is_active' property) + 'params': array, the entity data as supported by the CiviCRM API + 'update' (v4.5+): string, a policy which describes when to update records - 'always' (default): always update the managed-entity record; changes in $entities will override any local changes (eg by the site-admin) - 'never': never update the managed-entity record; changes made locally (eg by the site-admin) will override changes in $entities + 'cleanup' (v4.5+): string, a policy which describes whether to cleanup the record when it becomes orphaned (ie when $entities no longer references the record) - 'always' (default): always delete orphaned records - 'never': never delete orphaned records - 'unused': only delete orphaned records if there are no other references to it in the DB. (This is determined by calling the API's "getrefcount" action.)

Return Value

null the return value is ignored

in CRM_Utils_Hook at line 617
static string dashboard(int $contactID, int $contentPlacement = self::DASHBOARD_BELOW)

This hook is called when rendering the dashboard (q=civicrm/dashboard)

Parameters

int $contactID The contactID for whom the dashboard is being rendered.
int $contentPlacement (output parameter) where should the hook content be displayed. relative to the activity list

Return Value

string the html snippet to include in the dashboard

in CRM_Utils_Hook at line 643
static array recent(array $recentArray)

This hook is called before storing recently viewed items.

Parameters

array $recentArray An array of recently viewed or processed items, for in place modification.

Return Value

array

in CRM_Utils_Hook at line 664
static mixed referenceCounts(CRM_Core_DAO $dao, array $refCounts)

Determine how many other records refer to a given record.

Parameters

CRM_Core_DAO $dao The item for which we want a reference count.
array $refCounts 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

Return Value

mixed Return is not really intended to be used.

in CRM_Utils_Hook at line 683
static null buildAmount(int $pageType, CRM_Core_Form $form, array $amount)

This hook is called when building the amount structure for a Contribution or Event Page.

Parameters

int $pageType Is this a contribution or event page.
CRM_Core_Form $form Reference to the form object.
array $amount The amount structure to be displayed.

Return Value

null

in CRM_Utils_Hook at line 697
static null buildStateProvinceForCountry(array $countryID, $states)

This hook is called when building the state list for a particular country.

Parameters

array $countryID The country id whose states are being selected.
$states

Return Value

null

in CRM_Utils_Hook at line 715
static null tabs(array $tabs, int $contactID) deprecated

deprecated Use tabset() instead.

This hook is called when rendering the tabs for a contact (q=civicrm/contact/view)c

Parameters

array $tabs The array of tabs that will be displayed.
int $contactID The contactID for whom the dashboard is being rendered.

Return Value

null

in CRM_Utils_Hook at line 734
static null tabset(string $tabsetName, array $tabs, array $context)

This hook is called when rendering the tabs used for events and potentially contribution pages, etc.

Parameters

string $tabsetName Name of the screen or visual element.
array $tabs Tabs that will be displayed.
array $context Extra data about the screen or context in which the tab is used.

Return Value

null

in CRM_Utils_Hook at line 748
static null tokens(array $tokens)

This hook is called when sending an email / printing labels

Parameters

array $tokens The list of tokens that can be used for the contact.

Return Value

null

in CRM_Utils_Hook at line 771
static null tokenValues(array $details, array $contactIDs, int $jobID = NULL, array $tokens = array(), string $className = NULL)

This hook is called when sending an email / printing labels to get the values for all the tokens returned by the 'tokens' hook

Parameters

array $details The array to store the token values indexed by contactIDs (unless it a single).
array $contactIDs An array of contactIDs.
int $jobID The jobID if this is associated with a CiviMail mailing.
array $tokens The list of tokens associated with the content.
string $className The top level className from where the hook is invoked.

Return Value

null

in CRM_Utils_Hook at line 791
static null pageRun(object $page)

This hook is called before a CiviCRM Page is rendered. You can use this hook to insert smarty variables in a template

Parameters

object $page The page that will be rendered.

Return Value

null

in CRM_Utils_Hook at line 809
static null copy(string $objectName, object $object)

This hook is called after a copy of an object has been made. The current objects are Event, Contribution Page and UFGroup

Parameters

string $objectName Name of the object.
object $object Reference to the copy.

Return Value

null

in CRM_Utils_Hook at line 834
static mixed unsubscribeGroups(string $op, int $mailingId, int $contactId, array|int $groups, array|int $baseGroups)

This hook is called when a contact unsubscribes from a mailing. It allows modules to override what the contacts are removed from.

Parameters

string $op Ignored for now
int $mailingId The id of the mailing to unsub from
int $contactId The id of the contact who is unsubscribing
array|int $groups Groups the contact will be removed from.
array|int $baseGroups Base groups (used in smart mailings) the contact will be removed from.

Return Value

mixed

in CRM_Utils_Hook at line 859
static mixed customFieldOptions(int $customFieldID, array $options, bool $detailedFormat = FALSE, array $selectAttributes = array()) deprecated

deprecated in favor of hook_civicrm_fieldOptions

This hook is called when CiviCRM needs to edit/display a custom field with options

Parameters

int $customFieldID The custom field ID.
array $options The current set of options for that custom field. You can add/remove existing options. Important: This array may contain meta-data about the field that is needed elsewhere, so it is important to be careful to not overwrite the array. Only add/edit/remove the specific field options you intend to affect.
bool $detailedFormat If true, the options are in an ID => array ( 'id' => ID, 'label' => label, 'value' => value ) format
array $selectAttributes Contain select attribute(s) if any.

Return Value

mixed

in CRM_Utils_Hook at line 877
static mixed fieldOptions(string $entity, string $field, array $options, array $params)

Hook for modifying field options

Parameters

string $entity
string $field
array $options
array $params

Return Value

mixed

in CRM_Utils_Hook at line 903
static mixed searchTasks(string $objectType, array $tasks)

This hook is called to display the list of actions allowed after doing a search.

This allows the module developer to inject additional actions or to remove existing actions.

Parameters

string $objectType The object type for this search. - activity, campaign, case, contact, contribution, event, grant, membership, and pledge are supported.
array $tasks The current set of tasks for that custom field. You can add/remove existing tasks. Each task needs to have a title (eg 'title' => ts( 'Group - add contacts')) and a class (eg 'class' => 'CRM_Contact_Form_Task_AddToGroup'). Optional result (boolean) may also be provided. Class can be an array of classes (not sure what that does :( ). The key for new Task(s) should not conflict with the keys for core tasks of that $objectType, which can be found in CRM/$objectType/Task.php.

Return Value

mixed

in CRM_Utils_Hook at line 916
static mixed eventDiscount(mixed $form, array $params)

Parameters

mixed $form
array $params

Return Value

mixed

in CRM_Utils_Hook at line 935
static mixed mailingGroups(mixed $form, array $groups, array $mailings)

This hook is called when composing a mailing. You can include / exclude other groups as needed.

Parameters

mixed $form The form object for which groups / mailings being displayed
array $groups The list of groups being included / excluded
array $mailings The list of mailings being included / excluded

Return Value

mixed

in CRM_Utils_Hook at line 952
static mixed mailingTemplateTypes(array $types)

(Experimental) Modify the list of template-types used for CiviMail composition.

Parameters

array $types Sequentially indexed list of template types. Each type specifies: - name: string - editorUrl: string, Angular template URL - weight: int, priority when picking a default value for new mailings

Return Value

mixed

in CRM_Utils_Hook at line 973
static mixed membershipTypeValues(mixed $form, array $membershipTypes)

This hook is called when composing the array of membershipTypes and their cost during a membership registration (new or renewal).

Note the hook is called on initial page load and also reloaded after submit (PRG pattern). You can use it to alter the membership types when first loaded, or after submission (for example if you want to gather data in the form and use it to alter the fees).

Parameters

mixed $form The form object that is presenting the page
array $membershipTypes The array of membership types and their amount

Return Value

mixed

in CRM_Utils_Hook at line 993
static string summary(int $contactID, mixed $content, int $contentPlacement = self::SUMMARY_BELOW)

This hook is called when rendering the contact summary.

Parameters

int $contactID The contactID for whom the summary is being rendered
mixed $content
int $contentPlacement Specifies where the hook content should be displayed relative to the existing content

Return Value

string The html snippet to include in the contact summary

in CRM_Utils_Hook at line 1024
static mixed contactListQuery(mixed $query, string $queryText, string $context, int $id)

Use this hook to populate the list of contacts returned by Contact Reference custom fields.

By default, Contact Reference fields will search on and return all CiviCRM contacts. If you want to limit the contacts returned to a specific group, or some other criteria - you can override that behavior by providing a SQL query that returns some subset of your contacts. The hook is called when the query is executed to get the list of contacts to display.

Parameters

mixed $query
  • the query that will be executed (input and output parameter);. It's important to realize that the ACL clause is built prior to this hook being fired, so your query will ignore any ACL rules that may be defined. Your query must return two columns: the contact 'data' to display in the autocomplete dropdown (usually contact.sort_name - aliased as 'data') the contact IDs
string $queryText The name string to execute the query against (this is the value being typed in by the user).
string $context The context in which this ajax call is being made (for example: 'customfield', 'caseview').
int $id The id of the object for which the call is being made. For custom fields, it will be the custom field id

Return Value

mixed

in CRM_Utils_Hook at line 1053
static mixed alterPaymentProcessorParams(CRM_Core_Payment $paymentObj, array $rawParams, array $cookedParams)

Hook definition for altering payment parameters before talking to a payment processor back end.

Definition will look like this:

function hook_civicrm_alterPaymentProcessorParams( $paymentObj, &$rawParams, &$cookedParams );

Parameters

CRM_Core_Payment $paymentObj Instance of payment class of the payment processor invoked (e.g., 'CRM_Core_Payment_Dummy') See discussion in CRM-16224 as to whether $paymentObj should be passed by reference.
array $rawParams &$rawParams array of params as passed to to the processor
array $cookedParams &$cookedParams params after the processor code has translated them into its own key/value pairs

Return Value

mixed This return is not really intended to be used.

in CRM_Utils_Hook at line 1075
static mixed alterMailParams(array $params, string $context = NULL)

This hook is called when an email is about to be sent by CiviCRM.

Parameters

array $params Array fields include: groupName, from, toName, toEmail, subject, cc, bcc, text, html, returnPath, replyTo, headers, attachments (array)
string $context The context in which the hook is being invoked, eg 'civimail'.

Return Value

mixed

in CRM_Utils_Hook at line 1100
static mixed alterCalculatedMembershipStatus(array $membershipStatus, array $arguments, array $membership)

This hook is called when membership status is being calculated.

Parameters

array $membershipStatus Membership status details as determined - alter if required.
array $arguments Arguments passed in to calculate date. - 'start_date' - 'end_date' - 'status_date' - 'join_date' - 'exclude_is_admin' - 'membership_type_id'
array $membership Membership details from the calling function.

Return Value

mixed

in CRM_Utils_Hook at line 1115
static mixed alterMailContent(array $content)

This hook is called after getting the content of the mail and before tokenizing it.

Parameters

array $content Array fields include: html, text, subject

Return Value

mixed

in CRM_Utils_Hook at line 1132
static array caseSummary(int $caseID)

This hook is called when rendering the Manage Case screen.

Parameters

int $caseID The case ID.

Return Value

array Array of data to be displayed, where the key is a unique id to be used for styling (div id's) and the value is an array with keys 'label' and 'value' specifying label/value pairs

in CRM_Utils_Hook at line 1146
static mixed caseTypes(array $caseTypes)

This hook is called when locating CiviCase types.

Parameters

array $caseTypes

Return Value

mixed

in CRM_Utils_Hook at line 1160
static mixed config(CRM_Core_Config|array $config)

This hook is called soon after the CRM_Core_Config object has ben initialized.

You can use this hook to modify the config object and hence behavior of CiviCRM dynamically.

Parameters

CRM_Core_Config|array $config The config object

Return Value

mixed

in CRM_Utils_Hook at line 1179
static mixed optionValues(array $options, string $groupName) deprecated

deprecated in favor of hook_civicrm_fieldOptions

This hooks allows to change option values.

Parameters

array $options Associated array of option values / id
string $groupName Option group name

Return Value

mixed

in CRM_Utils_Hook at line 1194
static mixed navigationMenu(array $params)

This hook allows modification of the navigation menu.

Parameters

array $params Associated array of navigation menu entry to Modify/Add

Return Value

mixed

in CRM_Utils_Hook at line 1217
static mixed merge(string $type, array $data, int $mainId = NULL, int $otherId = NULL, array $tables = NULL)

This hook allows modification of the data used to perform merging of duplicates.

Parameters

string $type The type of data being passed (cidRefs|eidRefs|relTables|sqls).
array $data The data, as described in $type.
int $mainId Contact_id of the contact that survives the merge.
int $otherId Contact_id of the contact that will be absorbed and deleted.
array $tables When $type is "sqls", an array of tables as it may have been handed to the calling function.

Return Value

mixed

in CRM_Utils_Hook at line 1235
static mixed alterLocationMergeData(array $blocksDAO, int $mainId, int $otherId, array $migrationInfo)

This hook allows modification of the data calculated for merging locations.

Parameters

array $blocksDAO Array of location DAO to be saved. These are arrays in 2 keys 'update' & 'delete'.
int $mainId Contact_id of the contact that survives the merge.
int $otherId Contact_id of the contact that will be absorbed and deleted.
array $migrationInfo Calculated migration info, informational only.

Return Value

mixed

in CRM_Utils_Hook at line 1247
static mixed notePrivacy(array $noteValues)

This hook provides a way to override the default privacy behavior for notes.

Parameters

array $noteValues &$noteValues Associative array of values for this note

Return Value

mixed

in CRM_Utils_Hook at line 1268
static mixed export(string $exportTempTable, array $headerRows, array $sqlColumns, int $exportMode)

This hook is called before record is exported as CSV.

Parameters

string $exportTempTable Name of the temporary export table used during export.
array $headerRows Header rows for output.
array $sqlColumns SQL columns.
int $exportMode Export mode ( contact, contribution, etc...).

Return Value

mixed

in CRM_Utils_Hook at line 1287
static mixed dupeQuery(string $obj, string $type, array $query)

This hook allows modification of the queries constructed from dupe rules.

Parameters

string $obj Object of rulegroup class.
string $type Type of queries e.g table / threshold.
array $query Set of queries.

Return Value

mixed

in CRM_Utils_Hook at line 1308
static mixed emailProcessor(string $type, array $params, object $mail, array $result, string $action = NULL)

This hook is called AFTER EACH email has been processed by the script bin/EmailProcessor.php

Parameters

string $type Type of mail processed: 'activity' OR 'mailing'.
array $params &$params the params that were sent to the CiviCRM API function
object $mail The mail object which is an ezcMail class.
array $result &$result the result returned by the api call
string $action (optional ) the requested action to be performed if the types was 'mailing'.

Return Value

mixed

in CRM_Utils_Hook at line 1334
static mixed import(string $object, string $usage, string $objectRef, array $params)

This hook is called after a row has been processed and the record (and associated records imported

Parameters

string $object Object being imported (for now Contact only, later Contribution, Activity,. Participant and Member)
string $usage Hook usage/location (for now process only, later mapping and others).
string $objectRef Import record object.
array $params Array with various key values: currently. contactID - contact id importID - row id in temp table importTempTable - name of tempTable fieldHeaders - field headers fields - import fields

Return Value

mixed

in CRM_Utils_Hook at line 1354
static mixed alterAPIPermissions(string $entity, string $action, array $params, array $permissions)

This hook is called when API permissions are checked (cf. civicrm_api3_api_check_permission() in api/v3/utils.php and _civicrm_api3_permissions() in CRM/Core/DAO/permissions.php).

Parameters

string $entity The API entity (like contact).
string $action The API action (like get).
array $params &$params the API parameters
array $permissions &$permissions the associative permissions array (probably to be altered by this hook)

Return Value

mixed

in CRM_Utils_Hook at line 1366
static mixed postSave(CRM_Core_DAO $dao)

Parameters

CRM_Core_DAO $dao

Return Value

mixed

in CRM_Utils_Hook at line 1384
static mixed summaryActions(array $actions, int $contactID = NULL)

This hook allows user to customize context menu Actions on contact summary page.

Parameters

array $actions Array of all Actions in contextmenu.
int $contactID ContactID for the summary page.

Return Value

mixed

in CRM_Utils_Hook at line 1412
static mixed searchColumns(string $objectName, array $headers, array $rows, array $selector)

This hook is called from CRM_Core_Selector_Controller through which all searches in civicrm go.

This enables us hook implementors to modify both the headers and the rows

The BIGGEST drawback with this hook is that you may need to modify the result template to include your fields. The result files are CRM/{Contact,Contribute,Member,Event...}/Form/Selector.tpl

However, if you use the same number of columns, you can overwrite the existing columns with the values that you want displayed. This is a hackish, but avoids template modification.

Parameters

string $objectName The component name that we are doing the search. activity, campaign, case, contact, contribution, event, grant, membership, and pledge
array $headers &$headers the list of column headers, an associative array with keys: ( name, sort, order )
array $rows &$rows the list of values, an associate array with fields that are displayed for that component
array $selector the selector object. Allows you access to the context of the search

Return Value

mixed modify the header and values object to pass the data you need

in CRM_Utils_Hook at line 1429
static null buildUFGroupsForModule(string $moduleName, array $ufGroups)

This hook is called when uf groups are being built for a module.

Parameters

string $moduleName Module name.
array $ufGroups Array of ufgroups for a module.

Return Value

null

in CRM_Utils_Hook at line 1454
static null emailProcessorContact(string $email, int $contactID, array $result)

This hook is called when we are determining the contactID for a specific email address

Parameters

string $email The email address.
int $contactID The contactID that matches this email address, IF it exists.
array $result (reference) has two fields. contactID - the new (or same) contactID action - 3 possible values: CRM_Utils_Mail_Incoming::EMAILPROCESSOR_CREATE_INDIVIDUAL - create a new contact record CRM_Utils_Mail_Incoming::EMAILPROCESSOR_OVERRIDE - use the new contactID CRM_Utils_Mail_Incoming::EMAILPROCESSOR_IGNORE - skip this email address

Return Value

null

in CRM_Utils_Hook at line 1494
static mixed alterMailingLabelParams(array $args)

Hook definition for altering the generation of Mailing Labels.

Parameters

array $args An array of the args in the order defined for the tcpdf multiCell api call. with the variable names below converted into string keys (ie $w become 'w' as the first key for $args) float $w Width of cells. If 0, they extend up to the right margin of the page. float $h Cell minimum height. The cell extends automatically if needed. string $txt String to print mixed $border Indicates if borders must be drawn around the cell block. The value can be either a number:

  • 0: no border (default)
  • 1: frame

or a string containing some or all of the following characters (in any order):

  • L: left
  • T: top
  • R: right
  • B: bottom

string $align Allows to center or align the text. Possible values are:

  • L or empty string: left align
  • C: center
  • R: right align
  • J: justification (default value when $ishtml=false)

int $fill Indicates if the cell background must be painted (1) or transparent (0). Default value: 0. int $ln Indicates where the current position should go after the call. Possible values are:

  • 0: to the right
  • 1: to the beginning of the next line [DEFAULT]
  • 2: below

float $x x position in user units float $y y position in user units boolean $reseth if true reset the last cell height (default true). int $stretch stretch character mode:

  • 0 = disabled
  • 1 = horizontal scaling only if necessary
  • 2 = forced horizontal scaling
  • 3 = character spacing only if necessary
  • 4 = forced character spacing

boolean $ishtml set to true if $txt is HTML content (default = false). boolean $autopadding if true, uses internal padding and automatically adjust it to account for line width. float $maxh maximum height. It should be >= $h and less then remaining space to the bottom of the page, or 0 for disable this feature. This feature works only when $ishtml=false.

Return Value

mixed

in CRM_Utils_Hook at line 1516
static mixed alterContent($content, $context, $tplName, $object)

This hooks allows alteration of generated page content.

Parameters

$content Previously generated content.
$context Context of content - page or form.
$tplName The file name of the tpl.
$object A reference to the page or form object.

Return Value

mixed

in CRM_Utils_Hook at line 1538
static mixed alterTemplateFile($formName, $form, $context, $tplName)

This hooks allows alteration of the tpl file used to generate content. It differs from the altercontent hook as the content has already been rendered through the tpl at that point

Parameters

$formName Previously generated content.
$form Reference to the form object.
$context Context of content - page or form.
$tplName Reference the file name of the tpl.

Return Value

mixed

in CRM_Utils_Hook at line 1563
static mixed triggerInfo($info, string $tableName = NULL)

This hook collects the trigger definition from all components.

Parameters

$info
string $tableName (optional) the name of the table that we are interested in only.

Return Value

mixed

in CRM_Utils_Hook at line 1577
static mixed alterLogTables(array $logTableSpec)

This hook allows changes to the spec of which tables to log.

Parameters

array $logTableSpec

Return Value

mixed

in CRM_Utils_Hook at line 1590
static install()

This hook is called when a module-extension is installed.

Each module will receive hook_civicrm_install during its own installation (but not during the installation of unrelated modules).

in CRM_Utils_Hook at line 1603
static uninstall()

This hook is called when a module-extension is uninstalled.

Each module will receive hook_civicrm_uninstall during its own uninstallation (but not during the uninstallation of unrelated modules).

in CRM_Utils_Hook at line 1616
static enable()

This hook is called when a module-extension is re-enabled.

Each module will receive hook_civicrm_enable during its own re-enablement (but not during the re-enablement of unrelated modules).

in CRM_Utils_Hook at line 1629
static disable()

This hook is called when a module-extension is disabled.

Each module will receive hook_civicrm_disable during its own disablement (but not during the disablement of unrelated modules).

in CRM_Utils_Hook at line 1644
static mixed alterReportVar($varType, $var, $object)

Parameters

$varType
$var
$object

Return Value

mixed

in CRM_Utils_Hook at line 1665
static bool|null upgrade(string $op, $queue = NULL)

This hook is called to drive database upgrades for extension-modules.

Parameters

string $op The type of operation being performed; 'check' or 'enqueue'.
$queue (for 'enqueue') the modifiable list of pending up upgrade tasks.

Return Value

bool|null NULL, if $op is 'enqueue'. TRUE, if $op is 'check' and upgrades are pending. FALSE, if $op is 'check' and upgrades are not pending.

in CRM_Utils_Hook at line 1683
static mixed postEmailSend(array $params)

This hook is called when an email has been successfully sent by CiviCRM, but not on an error.

Parameters

array $params The mailing parameters. Array fields include: groupName, from, toName, toEmail, subject, cc, bcc, text, html, returnPath, replyTo, headers, attachments (array)

Return Value

mixed

in CRM_Utils_Hook at line 1699
static mixed postMailing(int $mailingId)

This hook is called when a CiviMail mailing has completed

Parameters

int $mailingId Mailing ID

Return Value

mixed

in CRM_Utils_Hook at line 1715
static mixed alterSettingsFolders(array $settingsFolders)

This hook is called when Settings specifications are loaded.

Parameters

array $settingsFolders List of paths from which to derive metadata

Return Value

mixed

in CRM_Utils_Hook at line 1734
static mixed alterSettingsMetaData(array $settingsMetaData, int $domainID, mixed $profile)

This hook is called when Settings have been loaded from the xml It is an opportunity for hooks to alter the data

Parameters

array $settingsMetaData Settings Metadata.
int $domainID
mixed $profile

Return Value

mixed

in CRM_Utils_Hook at line 1752
static null apiWrappers(API_Wrapper[] $wrappers, mixed $apiRequest)

This hook is called before running an api call.

Parameters

API_Wrapper[] $wrappers (see CRM_Utils_API_ReloadOption as an example)
mixed $apiRequest

Return Value

null The return value is ignored

in CRM_Utils_Hook at line 1767
static null cron(CRM_Core_JobManager $jobManager)

This hook is called before running pending cron jobs.

Parameters

CRM_Core_JobManager $jobManager

Return Value

null The return value is ignored.

in CRM_Utils_Hook at line 1785
static null permission(array $permissions)

This hook is called when loading CMS permissions; use this hook to modify the array of system permissions for CiviCRM.

Parameters

array $permissions Array of permissions. See CRM_Core_Permission::getCorePermissions() for the format of this array.

Return Value

null The return value is ignored

in CRM_Utils_Hook at line 1804
static null permission_check(string $permission, bool $granted)

This hook is called when checking permissions; use this hook to dynamically escalate user permissions in certain use cases (cf. CRM-19256).

Parameters

string $permission The name of an atomic permission, ie. 'access deleted contacts'
bool $granted Whether this permission is currently granted. The hook can change this value.

Return Value

null The return value is ignored

in CRM_Utils_Hook at line 1816
static unhandledException(CRM_Core_Exception $exception, mixed $request = NULL)

Parameters

CRM_Core_Exception $exception Exception $exception
mixed $request Reserved for future use.

in CRM_Utils_Hook at line 1838
static null entityTypes(array[] $entityTypes)

This hook is called for declaring managed entities via API.

Note: This is a preboot hook. It will dispatch via the extension/module subsystem but not the Symfony EventDispatcher.

Parameters

array[] $entityTypes List of entity types; each entity-type is an array with keys: - name: string, a unique short name (e.g. "ReportInstance") - class: string, a PHP DAO class (e.g. "CRM_Report_DAO_Instance") - table: string, a SQL table name (e.g. "civicrm_report_instance") - fields_callback: array, list of callables which manipulates field list - links_callback: array, list of callables which manipulates fk list

Return Value

null The return value is ignored

in CRM_Utils_Hook at line 1849
static eventDefs(CiviEventInspector $inspector)

Build a description of available hooks.

Parameters

CiviEventInspector $inspector

in CRM_Utils_Hook at line 1862
static mixed buildProfile(string $profileName)

This hook is called while preparing a profile form.

Parameters

string $profileName

Return Value

mixed

in CRM_Utils_Hook at line 1873
static mixed validateProfile(string $profileName)

This hook is called while validating a profile form submission.

Parameters

string $profileName

Return Value

mixed

in CRM_Utils_Hook at line 1884
static mixed processProfile(string $profileName)

This hook is called processing a valid profile form submission.

Parameters

string $profileName

Return Value

mixed

in CRM_Utils_Hook at line 1895
static mixed viewProfile(string $profileName)

This hook is called while preparing a read-only profile screen

Parameters

string $profileName

Return Value

mixed

in CRM_Utils_Hook at line 1906
static mixed searchProfile(string $profileName)

This hook is called while preparing a list of contacts (based on a profile)

Parameters

string $profileName

Return Value

mixed

in CRM_Utils_Hook at line 1926
static null alterBadge(string $labelName, object $label, array $format, array $participant)

This hook is invoked when building a CiviCRM name badge.

Parameters

string $labelName String referencing name of badge format.
object $label Reference to the label object.
array $format Array of format data.
array $participant Array of participant values.

Return Value

null the return value is ignored

in CRM_Utils_Hook at line 1944
static mixed alterBarcode(array $data, string $type = 'barcode', string $context = 'name_badge')

This hook is called before encoding data in barcode.

Parameters

array $data Associated array of values available for encoding.
string $type Type of barcode, classic barcode or QRcode.
string $context Where this hooks is invoked.

Return Value

mixed

in CRM_Utils_Hook at line 1962
static mixed alterMailer(object $mailer, string $driver, array $params)

Modify or replace the Mailer object used for outgoing mail.

Parameters

object $mailer The default mailer produced by normal configuration; a PEAR "Mail" class (like those returned by Mail::factory)
string $driver The type of the default mailer (eg "smtp", "sendmail", "mock", "CRM_Mailing_BAO_Spool")
array $params The default mailer config options

Return Value

mixed

See also

Mail::factory

in CRM_Utils_Hook at line 1982
static mixed alterMail(object $mailer, string $driver, array $params) deprecated

deprecated

Deprecated: Misnamed version of alterMailer(). Remove post-4.7.x.

Modify or replace the Mailer object used for outgoing mail.

Parameters

object $mailer The default mailer produced by normal configuration; a PEAR "Mail" class (like those returned by Mail::factory)
string $driver The type of the default mailer (eg "smtp", "sendmail", "mock", "CRM_Mailing_BAO_Spool")
array $params The default mailer config options

Return Value

mixed

See also

Mail::factory

in CRM_Utils_Hook at line 2002
static mixed queryObjects(array $queryObjects, string $type = 'Contact')

This hook is called while building the core search query, so hook implementers can provide their own query objects which alters/extends core search.

Parameters

array $queryObjects
string $type

Return Value

mixed

in CRM_Utils_Hook at line 2017
static mixed dashboard_defaults(array $availableDashlets, array $defaultDashlets)

This hook is called while viewing contact dashboard.

Parameters

array $availableDashlets List of dashlets; each is formatted per api/v3/Dashboard
array $defaultDashlets List of dashlets; each is formatted per api/v3/DashboardContact

Return Value

mixed

in CRM_Utils_Hook at line 2033
static mixed pre_case_merge(int $mainContactId, int $mainCaseId = NULL, int $otherContactId = NULL, int $otherCaseId = NULL, bool $changeClient = FALSE)

This hook is called before a case merge (or a case reassign)

Parameters

int $mainContactId
int $mainCaseId
int $otherContactId
int $otherCaseId
bool $changeClient

Return Value

mixed

in CRM_Utils_Hook at line 2049
static mixed post_case_merge(int $mainContactId, int $mainCaseId = NULL, int $otherContactId = NULL, int $otherCaseId = NULL, bool $changeClient = FALSE)

This hook is called after a case merge (or a case reassign)

Parameters

int $mainContactId
int $mainCaseId
int $otherContactId
int $otherCaseId
bool $changeClient

Return Value

mixed

in CRM_Utils_Hook at line 2067
static mixed alterDisplayName(string $displayName, int $contactId, object $dao)

Issue CRM-14276 Add a hook for altering the display name

hook_civicrm_contact_get_displayname(&$display_name, $objContact)

Parameters

string $displayName
int $contactId
object $dao The contact object.

Return Value

mixed

in CRM_Utils_Hook at line 2097
static null angularModules(array $angularModules)

EXPERIMENTAL: This hook allows one to register additional Angular modules

Parameters

array $angularModules List of modules.

Return Value

null the return value is ignored

in CRM_Utils_Hook at line 2110
static caseChange( $analyzer)

This hook fires whenever a record in a case changes.

Parameters

$analyzer A bundle of data about the case (such as the case and activity records).

Generate a default CRUD URL for an entity.

Parameters

array $spec With keys:. - action: int, eg CRM_Core_Action::VIEW or CRM_Core_Action::UPDATE - entity_table: string - entity_id: int
CRM_Core_DAO $bao
array $link To define the link, add these keys to $link:. - title: string - path: string - query: array - url: string (used in lieu of "path"/"query") Note: if making "url" CRM_Utils_System::url(), set $htmlize=false

Return Value

mixed

in CRM_Utils_Hook at line 2164
static container( $container)

Modify the CiviCRM container - add new services, parameters, extensions, etc.

Parameters

$container

See also

http://symfony.com/doc/current/components/dependency_injection/index.html

in CRM_Utils_Hook at line 2172
static mixed fileSearches(array $fileSearches)

Parameters

array $fileSearches $fileSearches

Return Value

mixed

in CRM_Utils_Hook at line 2186
static mixed check(array $messages)

Check system status.

Parameters

array $messages Array. A list of messages regarding system status.

Return Value

mixed

in CRM_Utils_Hook at line 2198
static mixed batchQuery(string $query)

This hook is called when a query string of the CSV Batch export is generated.

Parameters

string $query

Return Value

mixed

in CRM_Utils_Hook at line 2219
static mixed alterDeferredRevenueItems(array $deferredRevenues, array $contributionDetails, bool $update, string $context)

This hook is called to alter Deferred revenue item values just before they are inserted in civicrm_financial_trxn table

Parameters

array $deferredRevenues
array $contributionDetails
bool $update
string $context

Return Value

mixed

in CRM_Utils_Hook at line 2233
static mixed batchItems(array $results, array $items)

This hook is called when the entries of the CSV Batch export are mapped.

Parameters

array $results
array $items

Return Value

mixed

in CRM_Utils_Hook at line 2248
static coreResourceList(array $list, string $region)

This hook is called when core resources are being loaded

Parameters

array $list
string $region

See also

CRM_Core_Resources::coreResourceList

in CRM_Utils_Hook at line 2265
static entityRefFilters(array $filters)

Allows the list of filters on the EntityRef widget to be altered.

Parameters

array $filters

See also

CRM_Core_Resources::entityRefFilters

in CRM_Utils_Hook at line 2279
static mixed idsException(array $skip)

This hook is called for bypass a few civicrm urls from IDS check.

Parameters

array $skip list of civicrm urls

Return Value

mixed

in CRM_Utils_Hook at line 2295
static mixed geocoderFormat(string $geoProvider, array $values, SimpleXMLElement $xml)

This hook is called when a geocoder's format method is called.

Parameters

string $geoProvider
array $values
SimpleXMLElement $xml

Return Value

mixed

in CRM_Utils_Hook at line 2309
static mixed inboundSMS(CRM_SMS_Message $message)

This hook is called before an inbound SMS is processed.

Parameters

CRM_SMS_Message $message Object $message An SMS message recieved

Return Value

mixed