You are here

public function ModuleHandler::load in Service Container 7.2

Same name and namespace in other branches
  1. 7 src/Extension/ModuleHandler.php \Drupal\service_container\Extension\ModuleHandler::load()

Includes a module's .module file.

This prevents including a module more than once.

Parameters

string $name: The name of the module to load.

Return value

bool TRUE if the item is loaded or has already been loaded.

Overrides ModuleHandlerInterface::load

File

src/Extension/ModuleHandler.php, line 56
Contains Drupal\service_container\Extension\ModuleHandler.

Class

ModuleHandler
Class that manages modules in a Drupal installation.

Namespace

Drupal\service_container\Extension

Code

public function load($name) {
  return $this->drupal7
    ->drupal_load('module', $name);
}