Example #1
0
 /**
  * Removes a single module from the model
  * @param Module $module
  * @param zibo\ZiboException $previousException
  * @return null
  * @throws zibo\admin\model\exception\ModuleStillInUseException when the module is still needed by another module
  */
 private function removeSingleModule(Module $module, ZiboException $previousException = null)
 {
     $name = $module->getName();
     $namespace = $module->getNamespace();
     if ($module->hasUsage()) {
         throw new ModuleStillInUseException($module, $previousException);
     }
     $this->removeUsage($module);
     unset($this->modules[$namespace][$name]);
 }