Skip to content

All hooks

This is an overview list of all available hooks, listed by category.

Batch Hooks

Case Hooks

Database Hooks

Dedupe Hooks

  • hook_civicrm_dupeQuery - called during the dedupe lookup process, and can be used to alter the parameters and queries used to determine if two contacts are duplicates.
  • hook_civicrm_findDuplicates - called when contacts are added/updated via profiles, event registration pages, contribution pages etc. When a form is submitted CiviCRM checks if a contact already exists using one of the built-in deduplication rules and returns a contact ID if a match is found. allows you to override the contact matching rules to implement more complex rules.

Entity Hooks

  • hook_civicrm_entityTypes - used to declare a new type of entity, for example a booking extension might want to declare a Resource entity.

Extension Lifecycle Hooks

Form Hooks

GUI Hooks

  • hook_civicrm_activeTheme - The activeTheme hook determines which theme is active.
  • hook_civicrm_alterBundle - Specify the content of a resource bundle (JS/CSS/etc).
  • hook_civicrm_alterCustomFieldDisplayValue - allows modification of custom field value for an entity eg Individual, Contribution etc before its displayed on screen. This might be useful if you want to alter the value of the custom field that's being displayed on the screen based on some condition.
  • hook_civicrm_alterEntityRefParams - called when an entityRef field is rendered in a form, which allows you to modify the parameters used to fetch options for this kind of field.
  • hook_civicrm_alterMenu - called when building CiviCRM's list of HTTP routes and should be used when you want to register custom paths or URLS.
  • hook_civicrm_alterAdminPanel - invoked after all the panels and items on Administer CiviCRM screen have been generated and allows for direct manipulation of these items and panels.
  • hook_civicrm_buildAmount - called when building the amount structure for a Contribution or Event Page, allowing you to modify the set of radio buttons representing amounts for contribution levels and event registration fees.
  • hook_civicrm_caseSummary - called when the manage case screen is displayed, and it allows the injection of label/value pairs which are rendered inside divs underneath the existing summary table.
  • hook_civicrm_contact_get_displayname - Allows you to alter the "display name" of a contact.
  • hook_civicrm_customFieldOptions - Deprecated in 4.7 in favor of hook_civicrm_fieldOptions. Use that instead for modifying all option lists, not limited to custom fields.
  • hook_civicrm_dashboard - called when rendering the dashboard page and can be used to add content to the dashboard page.
  • hook_civicrm_dashboard_defaults - called while a contact views their dashboard for the first time and can be used to enable or disable the set of default dashlets.
  • hook_civicrm_entityRefFilters - called when filters and create links for entityRef field is build.
  • hook_civicrm_fieldOptions - allows you to dynamically modify the option list for any field (including custom fields).
  • hook_civicrm_links - allows you to modify action links including: the actions at the end of a search result row, the Create New dropdown, and the Actions dropdown at the top of a contact record.
  • hook_civicrm_navigationMenu - called after the menus are rebuilt.
  • hook_civicrm_pageRun - called before a CiviCRM page is rendered.
  • hook_civicrm_searchColumns - called after a search is done, allowing you to modify the headers and/or the values that are displayed as part of the search.
  • hook_civicrm_searchTasks - called to display the list of actions allowed after doing a search, allowing you to inject additional actions or to remove existing actions.
  • hook_civicrm_searchKitTasks - called to allow you to add to or alter the tasks available in Search Kit.
  • hook_civicrm_summary - called when the contact summary is rendered, allowing you to modify the summary with your own content.
  • hook_civicrm_summaryActions - allows you to customize the context menu actions on the Contact Summary Page.
  • hook_civicrm_themes - called when building a list of available themes for use within CiviCRM.
  • hook_civicrm_tabs - deprecated in 4.7 & removed in 5.31 in favor of hook_civicrm_tabset.
  • hook_civicrm_tabset - called when composing the tabs interface used for contacts, contributions and events.
  • hook_civicrm_xmlMenu - called when building CiviCRM's menu structure, which is used to render urls in CiviCRM.

Mail Hooks

Membership Hooks

Permission Hooks

Profile Hooks

Report Hooks

SMS Hooks

  • hook_civicrm_inboundSMS - called when an inbound SMS has been received, processed by the provider extension, but not matched or processed by CiviSMS.

Scheduled Job / cron Hooks

Uncategorized Hooks