当前位置: 首页>>代码示例>>PHP>>正文


PHP CRM_Utils_Hook::angularModules方法代码示例

本文整理汇总了PHP中CRM_Utils_Hook::angularModules方法的典型用法代码示例。如果您正苦于以下问题:PHP CRM_Utils_Hook::angularModules方法的具体用法?PHP CRM_Utils_Hook::angularModules怎么用?PHP CRM_Utils_Hook::angularModules使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在CRM_Utils_Hook的用法示例。


在下文中一共展示了CRM_Utils_Hook::angularModules方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: getModules

 /**
  * Get a list of AngularJS modules which should be autoloaded.
  *
  * @return array
  *   Each item has some combination of these keys:
  *   - ext: string
  *     The Civi extension which defines the Angular module.
  *   - js: array(string $relativeFilePath)
  *     List of JS files (relative to the extension).
  *   - css: array(string $relativeFilePath)
  *     List of CSS files (relative to the extension).
  *   - partials: array(string $relativeFilePath)
  *     A list of partial-HTML folders (relative to the extension).
  *     This will be mapped to "~/moduleName" by crmResource.
  *   - settings: array(string $key => mixed $value)
  *     List of settings to preload.
  */
 public function getModules()
 {
     if ($this->modules === NULL) {
         $config = \CRM_Core_Config::singleton();
         $angularModules = array();
         $angularModules['angularFileUpload'] = array('ext' => 'civicrm', 'js' => array('bower_components/angular-file-upload/dist/angular-file-upload.min.js'));
         $angularModules['crmApp'] = array('ext' => 'civicrm', 'js' => array('ang/crmApp.js'));
         $angularModules['crmAttachment'] = array('ext' => 'civicrm', 'js' => array('ang/crmAttachment.js'), 'css' => array('ang/crmAttachment.css'), 'partials' => array('ang/crmAttachment'), 'settings' => array('token' => \CRM_Core_Page_AJAX_Attachment::createToken()));
         $angularModules['crmAutosave'] = array('ext' => 'civicrm', 'js' => array('ang/crmAutosave.js'));
         $angularModules['crmCxn'] = array('ext' => 'civicrm', 'js' => array('ang/crmCxn.js', 'ang/crmCxn/*.js'), 'css' => array('ang/crmCxn.css'), 'partials' => array('ang/crmCxn'));
         //$angularModules['crmExample'] = array(
         //  'ext' => 'civicrm',
         //  'js' => array('ang/crmExample.js'),
         //  'partials' => array('ang/crmExample'),
         //);
         $angularModules['crmResource'] = array('ext' => 'civicrm', 'js' => array('js/angular-crmResource/all.js'));
         $angularModules['crmUi'] = array('ext' => 'civicrm', 'js' => array('ang/crmUi.js'), 'partials' => array('ang/crmUi'), 'settings' => array('browseUrl' => $config->userFrameworkResourceURL . 'packages/kcfinder/browse.php', 'uploadUrl' => $config->userFrameworkResourceURL . 'packages/kcfinder/upload.php'));
         $angularModules['crmUtil'] = array('ext' => 'civicrm', 'js' => array('ang/crmUtil.js'));
         // https://github.com/jwstadler/angular-jquery-dialog-service
         $angularModules['dialogService'] = array('ext' => 'civicrm', 'js' => array('bower_components/angular-jquery-dialog-service/dialog-service.js'));
         $angularModules['ngRoute'] = array('ext' => 'civicrm', 'js' => array('bower_components/angular-route/angular-route.min.js'));
         $angularModules['ngSanitize'] = array('ext' => 'civicrm', 'js' => array('bower_components/angular-sanitize/angular-sanitize.min.js'));
         $angularModules['ui.utils'] = array('ext' => 'civicrm', 'js' => array('bower_components/angular-ui-utils/ui-utils.min.js'));
         $angularModules['ui.sortable'] = array('ext' => 'civicrm', 'js' => array('bower_components/angular-ui-sortable/sortable.min.js'));
         $angularModules['unsavedChanges'] = array('ext' => 'civicrm', 'js' => array('bower_components/angular-unsavedChanges/dist/unsavedChanges.min.js'));
         foreach (\CRM_Core_Component::getEnabledComponents() as $component) {
             $angularModules = array_merge($angularModules, $component->getAngularModules());
         }
         \CRM_Utils_Hook::angularModules($angularModules);
         $this->modules = $this->resolvePatterns($angularModules);
     }
     return $this->modules;
 }
开发者ID:utkarshsharma,项目名称:civicrm-core,代码行数:50,代码来源:Manager.php

示例2: getAngularModules

 /**
  * Get a list of AngularJS modules which should be autoloaded
  *
  * @return array (string $name => array('ext' => string $key, 'js' => array $paths, 'css' => array $paths))
  */
 public static function getAngularModules()
 {
     $angularModules = array();
     $angularModules['ui.utils'] = array('ext' => 'civicrm', 'js' => array('packages/bower_components/angular-ui-utils/ui-utils.min.js'));
     $angularModules['ui.sortable'] = array('ext' => 'civicrm', 'js' => array('packages/bower_components/angular-ui-sortable/sortable.min.js'));
     $angularModules['unsavedChanges'] = array('ext' => 'civicrm', 'js' => array('packages/bower_components/angular-unsavedChanges/dist/unsavedChanges.min.js'));
     $angularModules['crmUi'] = array('ext' => 'civicrm', 'js' => array('js/angular-crm-ui.js'));
     foreach (CRM_Core_Component::getEnabledComponents() as $component) {
         $angularModules = array_merge($angularModules, $component->getAngularModules());
     }
     CRM_Utils_Hook::angularModules($angularModules);
     return $angularModules;
 }
开发者ID:prashantgajare,项目名称:civicrm-core,代码行数:18,代码来源:Angular.php

示例3: getModules

 public function getModules()
 {
     if ($this->modules === NULL) {
         $config = \CRM_Core_Config::singleton();
         $angularModules = array();
         //$angularModules['angularFileUpload'] = array(
         //  'ext' => 'civicrm',
         //  'js' => array('bower_components/angular-file-upload/angular-file-upload.min.js'),
         //);
         $angularModules['crmApp'] = array('ext' => 'civicrm', 'js' => array('ang/crmApp.js'));
         //$angularModules['crmAttachment'] = array(
         // 'ext' => 'civicrm',
         //  'js' => array('ang/crmAttachment.js'),
         //  'css' => array('ang/crmAttachment.css'),
         //  'partials' => array('ang/crmAttachment'),
         //  'settings' => array(
         //    'token' => \CRM_Core_Page_AJAX_Attachment::createToken(),
         //  ),
         //);
         $angularModules['crmAutosave'] = array('ext' => 'civicrm', 'js' => array('ang/crmAutosave.js'));
         $angularModules['crmCxn'] = array('ext' => 'civicrm', 'js' => array('ang/crmCxn.js', 'ang/crmCxn/*.js'), 'css' => array('ang/crmCxn.css'), 'partials' => array('ang/crmCxn'));
         $angularModules['crmResource'] = array('ext' => 'civicrm', 'js' => array('js/angular-crmResource/all.js'));
         $angularModules['crmUi'] = array('ext' => 'civicrm', 'js' => array('ang/crmUi.js'), 'partials' => array('ang/crmUi'), 'settings' => array('browseUrl' => $config->userFrameworkResourceURL . 'packages/kcfinder/browse.php', 'uploadUrl' => $config->userFrameworkResourceURL . 'packages/kcfinder/upload.php'));
         $angularModules['crmUtil'] = array('ext' => 'civicrm', 'js' => array('ang/crmUtil.js'));
         // https://github.com/jwstadler/angular-jquery-dialog-service
         $angularModules['dialogService'] = array('ext' => 'civicrm', 'js' => array('bower_components/angular-jquery-dialog-service/dialog-service.js'));
         $angularModules['ngRoute'] = array('ext' => 'civicrm', 'js' => array('bower_components/angular-route/angular-route.min.js'));
         $angularModules['ngSanitize'] = array('ext' => 'civicrm', 'js' => array('bower_components/angular-sanitize/angular-sanitize.min.js'));
         $angularModules['ui.utils'] = array('ext' => 'civicrm', 'js' => array('bower_components/angular-ui-utils/ui-utils.min.js'));
         $angularModules['ui.sortable'] = array('ext' => 'civicrm', 'js' => array('bower_components/angular-ui-sortable/sortable.min.js'));
         $angularModules['unsavedChanges'] = array('ext' => 'civicrm', 'js' => array('bower_components/angular-unsavedChanges/dist/unsavedChanges.min.js'));
         \CRM_Utils_Hook::angularModules($angularModules);
         //Lets filter out unneeded modules
         foreach ($angularModules as $name => $module) {
             //If the module doesn't request to be part of our page, and isn't a core module
             // that we have included, remove it
             if ((!array_key_exists("volunteer", $module) || !$module['volunteer']) && $module['ext'] != 'civicrm' && $module['ext'] != 'org.civicrm.angularprofiles') {
                 unset($angularModules[$name]);
             }
         }
         $this->modules = $this->resolvePatterns($angularModules);
     }
     return $this->modules;
 }
开发者ID:adam-edison,项目名称:org.civicrm.volunteer,代码行数:44,代码来源:Manager.php


注:本文中的CRM_Utils_Hook::angularModules方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。