You are here

protected static function Module::namespaces in Plug 7

Gets the array of available namespaces for plugins.

Parameters

bool $all: Include values for disabled modules.

Return value

array The generated array of namespaces.

1 call to Module::namespaces()
Module::getNamespaces in src/Util/Module.php
Generates the cached array of available namespaces for plugins.

File

src/Util/Module.php, line 106
Contains Drupal\plug\Util\Module.

Class

Module

Namespace

Drupal\plug\Util

Code

protected static function namespaces($all = FALSE) {
  $namespaces = array();
  foreach (static::getDirectories($all) as $module => $path) {
    $namespaces['Drupal\\' . $module] = $path . '/src';
  }
  return $namespaces;
}