/**
  * Compile the translation table for a particular module
  *
  * @param   string      $module     The name of the module for which to compile the translation table
  */
 public function compileModuleTranslation($module)
 {
     $this->moduleDir = $this->moduleMgr->getModuleDir($module);
     $this->tablePath = implode(DIRECTORY_SEPARATOR, array($this->moduleDir, 'application', 'locale', $this->locale, 'LC_MESSAGES', $module . '.po'));
     $this->compileTranslationTable();
 }
 /**
  * Load the setup module if Icinga Web 2 requires setup or the setup token exists
  *
  * @return $this
  */
 protected function loadSetupModuleIfNecessary()
 {
     if (!@file_exists($this->config->resolvePath('authentication.ini'))) {
         $this->requiresSetup = true;
         $this->moduleManager->loadModule('setup');
     } elseif ($this->setupTokenExists()) {
         // Load setup module but do not require setup
         $this->moduleManager->loadModule('setup');
     }
     return $this;
 }
 /**
  * Load all enabled modules
  *
  * @return self
  */
 protected function loadEnabledModules()
 {
     try {
         $this->moduleManager->loadEnabledModules();
     } catch (NotReadableError $e) {
         Logger::error(new Exception('Cannot load enabled modules. An exception was thrown:', 0, $e));
     }
     return $this;
 }