}
}
-/**
- * (Delegated) Implements hook_civicrm_angularModules().
- *
- * Find any and return any files matching "ang/*.ang.php"
- *
- * Note: This hook only runs in CiviCRM 4.5+.
- *
- * @link https://docs.civicrm.org/dev/en/latest/hooks/hook_civicrm_angularModules
- */
-function _afform_admin_civix_civicrm_angularModules(&$angularModules) {
- if (!is_dir(__DIR__ . '/ang')) {
- return;
- }
-
- $files = _afform_admin_civix_glob(__DIR__ . '/ang/*.ang.php');
- foreach ($files as $file) {
- $name = preg_replace(':\.ang\.php$:', '', basename($file));
- $module = include $file;
- if (empty($module['ext'])) {
- $module['ext'] = E::LONG_NAME;
- }
- $angularModules[$name] = $module;
- }
-}
-
/**
* Glob wrapper which is guaranteed to return an array.
*
_afform_admin_civix_civicrm_managed($entities);
}
-/**
- * Implements hook_civicrm_angularModules().
- *
- * Generate a list of Angular modules.
- *
- * Note: This hook only runs in CiviCRM 4.5+. It may
- * use features only available in v4.6+.
- *
- * @link http://wiki.civicrm.org/confluence/display/CRMDOC/hook_civicrm_angularModules
- */
-function afform_admin_civicrm_angularModules(&$angularModules) {
- _afform_admin_civix_civicrm_angularModules($angularModules);
-}
-
/**
* Implements hook_civicrm_entityTypes().
*
<psr4 prefix="Civi\" path="Civi"/>
</classloader>
<mixins>
+ <mixin>ang-php@1.0.0</mixin>
<mixin>menu-xml@1.0.0</mixin>
</mixins>
</extension>
}
}
-/**
- * (Delegated) Implements hook_civicrm_angularModules().
- *
- * Find any and return any files matching "ang/*.ang.php"
- *
- * Note: This hook only runs in CiviCRM 4.5+.
- *
- * @link https://docs.civicrm.org/dev/en/latest/hooks/hook_civicrm_angularModules
- */
-function _afform_civix_civicrm_angularModules(&$angularModules) {
- if (!is_dir(__DIR__ . '/ang')) {
- return;
- }
-
- $files = _afform_civix_glob(__DIR__ . '/ang/*.ang.php');
- foreach ($files as $file) {
- $name = preg_replace(':\.ang\.php$:', '', basename($file));
- $module = include $file;
- if (empty($module['ext'])) {
- $module['ext'] = E::LONG_NAME;
- }
- $angularModules[$name] = $module;
- }
-}
-
/**
* Glob wrapper which is guaranteed to return an array.
*
* Generate a list of Afform Angular modules.
*/
function afform_civicrm_angularModules(&$angularModules) {
- _afform_civix_civicrm_angularModules($angularModules);
-
$afforms = \Civi\Api4\Afform::get(FALSE)
->setSelect(['name', 'requires', 'module_name', 'directive_name'])
->execute();
<classloader>
<psr4 prefix="Civi\" path="Civi"/>
</classloader>
+ <mixins>
+ <mixin>ang-php@1.0.0</mixin>
+ </mixins>
</extension>
}
}
-/**
- * (Delegated) Implements hook_civicrm_angularModules().
- *
- * Find any and return any files matching "ang/*.ang.php"
- *
- * Note: This hook only runs in CiviCRM 4.5+.
- *
- * @link https://docs.civicrm.org/dev/en/latest/hooks/hook_civicrm_angularModules
- */
-function _afform_html_civix_civicrm_angularModules(&$angularModules) {
- if (!is_dir(__DIR__ . '/ang')) {
- return;
- }
-
- $files = _afform_html_civix_glob(__DIR__ . '/ang/*.ang.php');
- foreach ($files as $file) {
- $name = preg_replace(':\.ang\.php$:', '', basename($file));
- $module = include $file;
- if (empty($module['ext'])) {
- $module['ext'] = E::LONG_NAME;
- }
- $angularModules[$name] = $module;
- }
-}
-
/**
* Glob wrapper which is guaranteed to return an array.
*
_afform_html_civix_civicrm_managed($entities);
}
-/**
- * Implements hook_civicrm_angularModules().
- *
- * Generate a list of Angular modules.
- *
- * Note: This hook only runs in CiviCRM 4.5+. It may
- * use features only available in v4.6+.
- *
- * @link http://wiki.civicrm.org/confluence/display/CRMDOC/hook_civicrm_angularModules
- */
-function afform_html_civicrm_angularModules(&$angularModules) {
- _afform_html_civix_civicrm_angularModules($angularModules);
-}
-
/**
* Implements hook_civicrm_entityTypes().
*
<ext>org.civicrm.afform</ext>
</requires>
<comments>This extension is experimental and has limited functionality.</comments>
+ <mixins>
+ <mixin>ang-php@1.0.0</mixin>
+ </mixins>
<civix>
<namespace>CRM/AfformHtml</namespace>
</civix>
}
}
-/**
- * (Delegated) Implements hook_civicrm_angularModules().
- *
- * Find any and return any files matching "ang/*.ang.php"
- *
- * Note: This hook only runs in CiviCRM 4.5+.
- *
- * @link https://docs.civicrm.org/dev/en/latest/hooks/hook_civicrm_angularModules
- */
-function _afform_mock_civix_civicrm_angularModules(&$angularModules) {
- if (!is_dir(__DIR__ . '/ang')) {
- return;
- }
-
- $files = _afform_mock_civix_glob(__DIR__ . '/ang/*.ang.php');
- foreach ($files as $file) {
- $name = preg_replace(':\.ang\.php$:', '', basename($file));
- $module = include $file;
- if (empty($module['ext'])) {
- $module['ext'] = E::LONG_NAME;
- }
- $angularModules[$name] = $module;
- }
-}
-
/**
* Glob wrapper which is guaranteed to return an array.
*
_afform_mock_civix_civicrm_managed($entities);
}
-/**
- * Implements hook_civicrm_angularModules().
- *
- * Generate a list of Angular modules.
- *
- * Note: This hook only runs in CiviCRM 4.5+. It may
- * use features only available in v4.6+.
- *
- * @link http://wiki.civicrm.org/confluence/display/CRMDOC/hook_civicrm_angularModules
- */
-function afform_mock_civicrm_angularModules(&$angularModules) {
- _afform_mock_civix_civicrm_angularModules($angularModules);
-}
-
/**
* Implements hook_civicrm_entityTypes().
*
<ext>org.civicrm.afform</ext>
</requires>
<comments>Examples and tests for CiviCRM Afforms.</comments>
+ <mixins>
+ <mixin>ang-php@1.0.0</mixin>
+ </mixins>
<civix>
<namespace>CRM/AfformMock</namespace>
</civix>