private function DefaultModuleHelper::setModule

7.x-1.x DefaultModuleHelper.php private DefaultModuleHelper::setModule($module)

Sets the module machine name.

Not needed by public, should always inject via constructor.

@todo Consider rename to setModuleName.

Parameters

string $module : Required. A non empty module machine name.

Return value

IModuleHelper This.

1 call to DefaultModuleHelper::setModule()
DefaultModuleHelper::__construct in lib/Drupal/ooe/Module/DefaultModuleHelper.php
Constructor.

File

lib/Drupal/ooe/Module/DefaultModuleHelper.php, line 51
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

private function setModule($module) {
  if (empty($module) || !is_string($module)) {
    throw new \Exception('$module must be a non null string');
  }
  $this->module = $module;
  return $this;
}