Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
D
Developer Documentation
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
brienne
Developer Documentation
Commits
6c3029fd
Unverified
Commit
6c3029fd
authored
5 years ago
by
colemanw
Committed by
GitHub
5 years ago
Browse files
Options
Downloads
Patches
Plain Diff
Fix #616 document hook_civicrm_getAssetUrl
parent
46504e2d
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
docs/hooks/hook_civicrm_getAssetUrl.md
+32
-0
32 additions, 0 deletions
docs/hooks/hook_civicrm_getAssetUrl.md
with
32 additions
and
0 deletions
docs/hooks/hook_civicrm_getAssetUrl.md
0 → 100644
+
32
−
0
View file @
6c3029fd
# 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'
;
}
}
```
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment