/**
  * Execute the console command.
  *
  * @param ModuleManager    $manager
  * @param ModuleCollection $modules
  */
 public function fire(ModuleManager $manager, ModuleCollection $modules)
 {
     /* @var Module $module */
     $module = $modules->get($this->argument('module'));
     $manager->install($module, $this->option('seed'));
     $this->info(trans($module->getName()) . ' installed successfully!');
 }
 /**
  * Install an addon.
  *
  * @param Request          $request
  * @param ModuleManager    $modules
  * @param AddonCollection  $addons
  * @param ExtensionManager $extensions
  * @param                  $addon
  * @return \Illuminate\Http\RedirectResponse
  */
 public function install(Request $request, ModuleManager $modules, AddonCollection $addons, ExtensionManager $extensions, $addon)
 {
     /* @var Addon|Module|Extension $addon */
     $addon = $addons->get($addon);
     if ($addon instanceof Module) {
         $modules->install($addon, filter_var($request->input('seed'), FILTER_VALIDATE_BOOLEAN));
     } elseif ($addon instanceof Extension) {
         $extensions->install($addon, filter_var($request->input('seed'), FILTER_VALIDATE_BOOLEAN));
     }
     $this->messages->success('module::message.install_addon_success');
     return $this->redirect->back();
 }
 /**
  * Install an addon.
  *
  * @param AddonCollection  $addons
  * @param ModuleManager    $modules
  * @param ExtensionManager $extensions
  * @param                  $addon
  * @return \Illuminate\Http\RedirectResponse
  */
 public function install(AddonCollection $addons, ModuleManager $modules, ExtensionManager $extensions, $addon)
 {
     /* @var Addon $addon */
     $addon = $addons->get($addon);
     if ($addon instanceof Module) {
         $modules->install($addon);
     } elseif ($addon instanceof Extension) {
         $extensions->install($addon);
     }
     $this->messages->success('module::message.install_addon_success');
     return $this->redirect->back();
 }
 /**
  * Execute the console command.
  *
  * @param AddonCollection  $addons
  * @param ModuleManager    $modules
  * @param ExtensionManager $extensions
  */
 public function fire(AddonCollection $addons, ModuleManager $modules, ExtensionManager $extensions)
 {
     if (!($addon = $addons->get($this->argument('addon')))) {
         $this->error('The [' . $this->argument('addon') . '] could not be found.');
     }
     if ($addon instanceof Module) {
         $modules->install($addon, $this->option('seed'));
         $this->info('The [' . $this->argument('addon') . '] module was installed.');
     }
     if ($addon instanceof Extension) {
         $extensions->install($addon, $this->option('seed'));
         $this->info('The [' . $this->argument('addon') . '] extension was installed.');
     }
 }
 /**
  * Handle the command.
  *
  * @param InstallAllModules $command
  */
 public function handle(InstallAllModules $command)
 {
     foreach ($this->modules->all() as $module) {
         $this->manager->install($module, $command->getSeed());
     }
 }
 /**
  * Install a module.
  *
  * @param ModuleCollection $modules
  * @param ModuleManager    $manager
  * @param                  $module
  */
 public function module(ModuleCollection $modules, ModuleManager $manager, $module)
 {
     set_time_limit(5000);
     $manager->install($modules->get($module));
     return response()->json(true);
 }