public ModuleHandler::__construct($root, array $module_list = array(), CacheBackendInterface $cache_backend)
Constructs a ModuleHandler object.
Parameters
string $root: The app root.
array $module_list: An associative array whose keys are the names of installed modules and whose values are Extension class parameters. This is normally the %container.modules% parameter being set up by DrupalKernel.
\Drupal\Core\Cache\CacheBackendInterface $cache_backend: Cache backend for storing module hook implementation information.
See also
\Drupal\Core\CoreServiceProvider
File
- core/lib/Drupal/Core/Extension/ModuleHandler.php, line 109
Class
- ModuleHandler
- Class that manages modules in a Drupal installation.
Namespace
Drupal\Core\Extension
Code
1 2 3 4 5 6 7 8 | public function __construct( $root , array $module_list = array (), CacheBackendInterface $cache_backend ) { $this ->root = $root ; $this ->moduleList = array (); foreach ( $module_list as $name => $module ) { $this ->moduleList[ $name ] = new Extension( $this ->root, $module [ 'type' ], $module [ 'pathname' ], $module [ 'filename' ]); } $this ->cacheBackend = $cache_backend ; } |
Please login to continue.