Skip to content
Snippets Groups Projects
Commit dc56e08c authored by Sean Madsen's avatar Sean Madsen Committed by Monish Deb
Browse files

Improve markdown and grammar

parent 90ac87a0
No related branches found
No related tags found
No related merge requests found
......@@ -2,7 +2,7 @@
## Summary
Allows you to modify entityRef field params.
This hook is 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.
## Availability
......@@ -14,22 +14,17 @@ This hook is available in CiviCRM 4.7.27+ (maybe depends on the commit).
## Parameters
- @param array $params - parameters of entityRef field
## Details
This hook is called when entityRef field is rendered in form, which allows you to modify the parameters used to fetch options for this kind of field.
- array `$params` - parameters of entityRef field
## Example
```php
function myextension_civicrm_alterEntityRefParams(&$params) {
// use your custom API to fetch tags of your choice
if ($params['entity'] == 'tag') {
$params['entity'] = 'my_tags';
$params['api'] = array('params' => array('parent_id' => 292));
}
...
}
function myextension_civicrm_alterEntityRefParams(&$params) {
// use your custom API to fetch tags of your choice
if ($params['entity'] == 'tag') {
$params['entity'] = 'my_tags';
$params['api'] = array('params' => array('parent_id' => 292));
}
// ...
}
```
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment