Skip to content
Snippets Groups Projects
Unverified Commit 65ecd6ac authored by Sean Madsen's avatar Sean Madsen Committed by GitHub
Browse files

Merge pull request #524 from civicrm/hook_civicrm_alterAngular

Create hook_civicrm_alterAngular.md
parents a3f76fec 63b31e53
Branches
No related tags found
No related merge requests found
......@@ -19,7 +19,11 @@ independent deployments with independent configurations).
...
## tldr
## Hooks
* **[hook_civicrm_alterAngular](/hooks/hook_civicrm_alterAngular.md)** - Alter the definition of some Angular HTML partials.
## Example
```php
function mailwords_civicrm_alterAngular(\Civi\Angular\Manager $angular) {
......
# hook_civicrm_alterAngular
## Summary
This hook alters the definition of some AngularJS HTML partials and allows you to inject [AngularJS changesets](/framework/angular/changeset/).
## Availability
This hook is available in CiviCRM 4.7.21 and later.
## Definition
hook_civicrm_alterAngular(&$angular)
## Parameters
- array `$angular` - `\Civi\Angular\Manager`
## Example
```php
function example_civicrm_alterAngular($angular) {
$angular->add(\Civi\Angular\ChangeSet::create('mychanges')
->alterHtml('~/crmMailing/EditMailingCtrl/2step.html', function(phpQueryObject $doc) {
$doc->find('[ng-form="crmMailingSubform"]')->attr('cat-stevens', 'ts(\'wild world\')');
})
);
}
```
......@@ -51,6 +51,7 @@ This is an overview list of all available hooks, listed by category.
## Form Hooks
* **[hook_civicrm_alterAngular](/hooks/hook_civicrm_alterAngular.md)** - alters the definition of some AngularJS HTML partials and allows you to inject [AngularJS changesets](/framework/angular/changeset/).
* **[hook_civicrm_alterContent](/hooks/hook_civicrm_alterContent.md)** - invoked after all the content of a CiviCRM form or page is generated and allows for direct manipulation of the generated content.
* **[hook_civicrm_alterTemplateFile](/hooks/hook_civicrm_alterTemplateFile.md)** - invoked while selecting the tpl file to use to render the page.
* **[hook_civicrm_buildForm](/hooks/hook_civicrm_buildForm.md)** - invoked when building a form. It can be used to set the default values of a form element, to change form elements attributes, and to add new fields to a form.
......
......@@ -93,6 +93,7 @@ pages:
- hook_civicrm_uninstall: hooks/hook_civicrm_uninstall.md
- hook_civicrm_upgrade: hooks/hook_civicrm_upgrade.md
- Form Hooks:
- hook_civicrm_alterAngular: hooks/hook_civicrm_alterAngular.md
- hook_civicrm_alterContent: hooks/hook_civicrm_alterContent.md
- hook_civicrm_alterTemplateFile: hooks/hook_civicrm_alterTemplateFile.md
- hook_civicrm_buildForm: hooks/hook_civicrm_buildForm.md
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment