Beispiel #1
0
 /**
  * Register web integration
  *
  * Add controller directory to mvc
  *
  * @return $this
  */
 protected function registerWebIntegration()
 {
     if (!$this->app->isWeb()) {
         return $this;
     }
     return $this->registerLocales()->registerRoutes();
 }
Beispiel #2
0
 /**
  * Register web integration
  *
  * Add controller directory to mvc
  *
  * @return self
  */
 protected function registerWebIntegration()
 {
     if (!$this->app->isWeb()) {
         return $this;
     }
     if (file_exists($this->controllerdir) && is_dir($this->controllerdir)) {
         $this->app->getfrontController()->addControllerDirectory($this->controllerdir, $this->name);
     }
     $this->registerLocales()->registerRoutes();
     return $this;
 }
Beispiel #3
0
 /**
  * Register web integration
  *
  * Add controller directory to mvc
  *
  * @return $this
  */
 protected function registerWebIntegration()
 {
     if (!$this->app->isWeb()) {
         return $this;
     }
     $moduleControllerDir = $this->getControllerDir();
     if (is_dir($moduleControllerDir)) {
         $this->app->getfrontController()->addControllerDirectory($moduleControllerDir, $this->getName());
         $this->app->getLoader()->registerNamespace('Icinga\\Module\\' . ucfirst($this->getName()) . '\\' . Dispatcher::CONTROLLER_NAMESPACE, $moduleControllerDir);
     }
     $this->registerLocales()->registerRoutes();
     return $this;
 }