Unverified Commit 045e8012 authored by MikeyMJCO's avatar MikeyMJCO Committed by GitHub
Browse files

Revert "Add documentation for alterCustomFieldDisplayValue Hook"

parent d2a36a3c
# hook_civicrm_alterCustomFieldDisplayValue
## Summary
This hook 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.
## Definition
hook_civicrm_alterCustomFieldDisplayValue(&$displayValue, $value, $entityId, $fieldInfo) {
## Parameters
- $displayValue - String that will be displayed on screen.
- $value - Value from the database for the entity id.
- $entityId - Entity Id.
- $fieldInfo - Array having details of custom field like name, label, custom_group_id etc.
## Returns
- null
## Example
```php
/**
* Implementation of hook_civicrm_alterCustomFieldDisplayValue
*/
function extension_civicrm_alterCustomFieldDisplayValue(&$displayValue, $value, $entityId, $fieldInfo) {
if ($fieldInfo['name'] == 'alter_cf_field') {
$displayValue = 'New value';
}
}
```
......@@ -69,7 +69,6 @@ This is an overview list of all available hooks, listed by category.
## GUI Hooks
* **[hook_civicrm_activeTheme](/hooks/hook_civicrm_activeTheme.md)** - The activeTheme hook determines which theme is active.
* **[hook_civicrm_alterCustomFieldDisplayValue](/hooks/hook_civicrm_alterCustomFieldDisplayValue.md)** - 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](/hooks/hook_civicrm_alterEntityRefParams.md)** - 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](/hooks/hook_civicrm_alterMenu.md)** - called when building CiviCRM's list of HTTP routes and should be used when you want to register custom paths or URLS.
* **[hook_civicrm_buildAmount](/hooks/hook_civicrm_buildAmount.md)** - 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.
......
......@@ -124,7 +124,6 @@ pages:
- hook_civicrm_validateForm: hooks/hook_civicrm_validateForm.md
- GUI Hooks:
- hook_civicrm_activeTheme: hooks/hook_civicrm_activeTheme.md
- hook_civicrm_alterCustomFieldDisplayValue: hooks/hook_civicrm_alterCustomFieldDisplayValue.md
- hook_civicrm_alterEntityRefParams: hooks/hook_civicrm_alterEntityRefParams.md
- hook_civicrm_alterMenu: hooks/hook_civicrm_alterMenu.md
- hook_civicrm_buildAmount: hooks/hook_civicrm_buildAmount.md
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment