Ejemplo n.º 1
0
 /**
  * Perform post-registration booting of services.
  *
  * @return void
  */
 public function boot()
 {
     $installed_modules = \Illuminato\Module::getInstalledModules();
     foreach ($installed_modules as $key => $module) {
         $module_dir = _PS_MODULE_DIR_ . $module['name'];
         if (\Module::isEnabled($module['name'])) {
             if (is_dir($module_dir . '/resources/views')) {
                 $this->loadViewsFrom($module_dir . '/resources/views', $module['namespace']);
             }
             if (is_dir($module_dir . '/resources/lang')) {
                 $this->loadTranslationsFrom($module_dir . '/resources/lang', $module['namespace']);
             }
             if (is_dir($module_dir . '/config')) {
                 $this->loadConfigsFrom($module_dir . '.config', $module['namespace']);
             }
         }
     }
     //Now we can load the module's config files
     $configLoader = new LoadConfiguration();
     $configLoader->loadModuleConfigurationFiles(app());
 }
Ejemplo n.º 2
0
 public function uninstall()
 {
     // Call install parent method
     if (!parent::uninstall()) {
         return false;
     }
     $this->removeFromModuleList();
     if (!$this->resetMigrations()) {
         return false;
     }
     return true;
 }