Skip to content
Snippets Groups Projects
Unverified Commit 6c3029fd authored by colemanw's avatar colemanw Committed by GitHub
Browse files

Fix #616 document hook_civicrm_getAssetUrl

parent 46504e2d
No related branches found
No related tags found
No related merge requests found
# hook_civicrm_getAssetUrl
## Summary
This hook is called when building a link to a semi-static asset, allowing you to modify the params the asset will be built with.
## Notes
For more discussion, see [AssetBuilder](/framework/asset-builder.md).
## Definition
hook_civicrm_getAssetUrl(&$asset, &$params)
## Parameters
* `$asset` (string): the logical file name of an asset (ex: `hello-world.json`)
* `$params` (array): an optional set of parameters describing how to build the asset
## Returns
* null
## Example
```php
function mymodule_civicrm_getAssetUrl(&$asset, &$params) {
if ($asset === 'hello-world.json') {
$params['planet'] = 'Earth';
}
}
```
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