X-Git-Url: https://vcs.fsf.org/?a=blobdiff_plain;f=CRM%2FUtils%2FHook.php;h=12e595fb5cce795ecf5424be3cb4fcc565685269;hb=f9585de5e5436d3909c1830543a50cf23fcccc79;hp=1484a1fdaf525662e77a01bc0daae504bc651d87;hpb=1d7a41bf759575369703cadd1ba0c6bae156d54d;p=civicrm-core.git diff --git a/CRM/Utils/Hook.php b/CRM/Utils/Hook.php index 1484a1fdaf..12e595fb5c 100644 --- a/CRM/Utils/Hook.php +++ b/CRM/Utils/Hook.php @@ -2110,8 +2110,8 @@ abstract class CRM_Utils_Hook { * ); * $angularModules['myBigAngularModule'] = array( * 'ext' => 'org.example.mymod', - * 'js' => array('js/part1.js', 'js/part2.js'), - * 'css' => array('css/myAngularModule.css'), + * 'js' => array('js/part1.js', 'js/part2.js', 'ext://other.ext.name/file.js', 'assetBuilder://dynamicAsset.js'), + * 'css' => array('css/myAngularModule.css', 'ext://other.ext.name/file.css', 'assetBuilder://dynamicAsset.css'), * 'partials' => array('partials/myBigAngularModule'), * 'requires' => array('otherModuleA', 'otherModuleB'), * 'basePages' => array('civicrm/a'), @@ -2133,11 +2133,12 @@ abstract class CRM_Utils_Hook { * * @code * function example_civicrm_alterAngular($angular) { - * $angular->add(ChangeSet::create('mychanges') + * $changeSet = \Civi\Angular\ChangeSet::create('mychanges') * ->alterHtml('~/crmMailing/EditMailingCtrl/2step.html', function(phpQueryObject $doc) { * $doc->find('[ng-form="crmMailingSubform"]')->attr('cat-stevens', 'ts(\'wild world\')'); * }) * ); + * $angular->add($changeSet); * } * @endCode */ @@ -2381,4 +2382,18 @@ abstract class CRM_Utils_Hook { return self::singleton()->invoke(array('message'), $message, self::$_nullObject, self::$_nullObject, self::$_nullObject, self::$_nullObject, self::$_nullObject, 'civicrm_inboundSMS'); } + /** + * This hook is called to modify api params of EntityRef form field + * + * @param array $params + * + * @return mixed + */ + public static function alterEntityRefParams(&$params, $formName) { + return self::singleton()->invoke(array('params', 'formName'), $params, $formName, + self::$_nullObject, self::$_nullObject, self::$_nullObject, self::$_nullObject, + 'civicrm_alterEntityRefParams' + ); + } + }