You are here

function angularjs_get_modules in AngularJS 7

Returns the registered AngularJS modules

Parameters

string $type :

boolean $reset :

string $version :

Return value

array

5 calls to angularjs_get_modules()
angularjs_get_controllers in ./angularjs.module
Returns a list of AngularJS controllers exposed by modules
angularjs_get_directives in ./angularjs.module
Returns a list of AngularJS directives exposed by modules
angularjs_get_filters in ./angularjs.module
Returns a list of AngularJS filters exposed by modules
angularjs_get_services in ./angularjs.module
Returns a list of AngularJS services exposed by modules
angularjs_library in ./angularjs.module
Implements hook_library().

File

./angularjs.module, line 508

Code

function angularjs_get_modules($type, $reset = FALSE, $version = NULL) {
  $name = 'angularjs_' . $type;
  $modules =& drupal_static($name, array());
  if (TRUE === empty($modules)) {
    $cached_modules = cache_get($name);
    if (FALSE === isset($cached_modules->data) || TRUE == $reset) {
      $modules = module_invoke_all($name, $version);
      drupal_alter($name, $modules, $version);
      cache_set($name, $modules);
    }
    else {
      $modules = $cached_modules->data;
    }
  }
  return $modules;
}