public function DefaultModuleHelper::__construct

7.x-1.x DefaultModuleHelper.php public DefaultModuleHelper::__construct($module, IFactory $factory = NULL)

Constructor.

Parameters

string $module: Required. The machine name of the module.

IFactory $factory: Optional factory; if none given or null a DefaultFactory will be used.

6 calls to DefaultModuleHelper::__construct()
AbstractFormController::__construct in lib/Drupal/ooe/Form/AbstractFormController.php
Constructor.
AbstractModuleMap::__construct in lib/Drupal/ooe/Module/AbstractModuleMap.php
Constructor.
AbstractProject::__construct in lib/Drupal/ooe/Project/AbstractProject.php
Constructor.
DefaultMenuItem::__construct in lib/Drupal/ooe/Menu/DefaultMenuItem.php
Constructor.
DemoOfMenuTabs::__construct in lib/Drupal/ooe/Demo/Tabs/DemoOfMenuTabs.php
Constructor: fetches an IMenuTabs from a factory.

... See full list

6 methods override DefaultModuleHelper::__construct()
AbstractFormController::__construct in lib/Drupal/ooe/Form/AbstractFormController.php
Constructor.
AbstractModuleMap::__construct in lib/Drupal/ooe/Module/AbstractModuleMap.php
Constructor.
AbstractProject::__construct in lib/Drupal/ooe/Project/AbstractProject.php
Constructor.
DefaultMenuItem::__construct in lib/Drupal/ooe/Menu/DefaultMenuItem.php
Constructor.
DemoOfMenuTabs::__construct in lib/Drupal/ooe/Demo/Tabs/DemoOfMenuTabs.php
Constructor: fetches an IMenuTabs from a factory.

... See full list

File

lib/Drupal/ooe/Module/DefaultModuleHelper.php, line 81
DefaultModuleHelper

Class

DefaultModuleHelper
Classes that need to keep a record of the name of the module they serve may choose to extend this.

Namespace

Drupal\ooe\Module

Code

public function __construct($module, IFactory $factory = NULL) {
  if (empty($module) || !is_string($module)) {
    throw new \Exception('$module must be a non-null string !');
  }
  $this->setModule($module);
  if (!empty($factory)) {
    $this->setFactory($factory);
  }
}