X-Git-Url: https://vcs.fsf.org/?a=blobdiff_plain;f=Civi%2FAngular%2FManager.php;h=62d896e2f8f505dc018bc4a3734bd028a7c4b82d;hb=2644aface7e336051f6808a0a24c8559a496be83;hp=3f477620515655df93613fe91838a7acc58e78fc;hpb=f013c138c482d06f502d74336ac01e8fb691ad2f;p=civicrm-core.git diff --git a/Civi/Angular/Manager.php b/Civi/Angular/Manager.php index 3f47762051..62d896e2f8 100644 --- a/Civi/Angular/Manager.php +++ b/Civi/Angular/Manager.php @@ -83,6 +83,7 @@ class Manager { $angularModules['crmCxn'] = include "$civicrm_root/ang/crmCxn.ang.php"; // $angularModules['crmExample'] = include "$civicrm_root/ang/crmExample.ang.php"; $angularModules['crmResource'] = include "$civicrm_root/ang/crmResource.ang.php"; + $angularModules['crmRouteBinder'] = include "$civicrm_root/ang/crmRouteBinder.ang.php"; $angularModules['crmUi'] = include "$civicrm_root/ang/crmUi.ang.php"; $angularModules['crmUtil'] = include "$civicrm_root/ang/crmUtil.ang.php"; $angularModules['dialogService'] = include "$civicrm_root/ang/dialogService.ang.php"; @@ -327,7 +328,12 @@ class Manager { $module = $this->getModule($moduleName); if (isset($module[$resType])) { foreach ($module[$resType] as $file) { - switch ($refType) { + $refTypeSuffix = ''; + if (is_string($file) && preg_match(';^(assetBuilder|ext)://;', $file)) { + $refTypeSuffix = '-' . parse_url($file, PHP_URL_SCHEME); + } + + switch ($refType . $refTypeSuffix) { case 'path': $result[] = $this->res->getPath($module['ext'], $file); break; @@ -340,6 +346,33 @@ class Manager { $result[] = $this->res->getUrl($module['ext'], $file, TRUE); break; + case 'path-assetBuilder': + $assetName = parse_url($file, PHP_URL_HOST) . parse_url($file, PHP_URL_PATH); + $assetParams = array(); + parse_str('' . parse_url($file, PHP_URL_QUERY), $assetParams); + $result[] = \Civi::service('asset_builder')->getPath($assetName, $assetParams); + break; + + case 'rawUrl-assetBuilder': + case 'cacheUrl-assetBuilder': + $assetName = parse_url($file, PHP_URL_HOST) . parse_url($file, PHP_URL_PATH); + $assetParams = array(); + parse_str('' . parse_url($file, PHP_URL_QUERY), $assetParams); + $result[] = \Civi::service('asset_builder')->getUrl($assetName, $assetParams); + break; + + case 'path-ext': + $result[] = $this->res->getPath(parse_url($file, PHP_URL_HOST), ltrim(parse_url($file, PHP_URL_PATH), '/')); + break; + + case 'rawUrl-ext': + $result[] = $this->res->getUrl(parse_url($file, PHP_URL_HOST), ltrim(parse_url($file, PHP_URL_PATH), '/')); + break; + + case 'cacheUrl-ext': + $result[] = $this->res->getUrl(parse_url($file, PHP_URL_HOST), ltrim(parse_url($file, PHP_URL_PATH), '/'), TRUE); + break; + case 'settings': case 'requires': if (!empty($module[$resType])) {