-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
f136ce4
commit 87cefd7
Showing
9 changed files
with
208 additions
and
224 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -23,8 +23,13 @@ | |
<compatibility> | ||
<ver>5.36</ver> | ||
</compatibility> | ||
<comments></comments> | ||
<comments/> | ||
<civix> | ||
<namespace>CRM/CsvImportHelper</namespace> | ||
<format>22.05.2</format> | ||
</civix> | ||
<mixins> | ||
<mixin>[email protected]</mixin> | ||
<mixin>[email protected]</mixin> | ||
</mixins> | ||
</extension> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
<?php | ||
|
||
/** | ||
* Auto-register "ang/*.ang.php" files. | ||
* | ||
* @mixinName ang-php | ||
* @mixinVersion 1.0.0 | ||
* | ||
* @param CRM_Extension_MixInfo $mixInfo | ||
* On newer deployments, this will be an instance of MixInfo. On older deployments, Civix may polyfill with a work-a-like. | ||
* @param \CRM_Extension_BootCache $bootCache | ||
* On newer deployments, this will be an instance of MixInfo. On older deployments, Civix may polyfill with a work-a-like. | ||
*/ | ||
return function ($mixInfo, $bootCache) { | ||
|
||
/** | ||
* @param \Civi\Core\Event\GenericHookEvent $e | ||
* @see CRM_Utils_Hook::angularModules() | ||
*/ | ||
Civi::dispatcher()->addListener('hook_civicrm_angularModules', function ($e) use ($mixInfo) { | ||
// When deactivating on a polyfill/pre-mixin system, listeners may not cleanup automatically. | ||
if (!$mixInfo->isActive() || !is_dir($mixInfo->getPath('ang'))) { | ||
return; | ||
} | ||
|
||
$files = (array) glob($mixInfo->getPath('ang/*.ang.php')); | ||
foreach ($files as $file) { | ||
$name = preg_replace(':\.ang\.php$:', '', basename($file)); | ||
$module = include $file; | ||
if (empty($module['ext'])) { | ||
$module['ext'] = $mixInfo->longName; | ||
} | ||
$e->angularModules[$name] = $module; | ||
} | ||
}); | ||
|
||
}; |
Oops, something went wrong.