Commit 7a015f67 authored by Nicolas Widart's avatar Nicolas Widart

Squashed 'Modules/Core/' changes from 9450e60..09b7768

09b7768 Use short array syntax
f236ef0 Create a command wrapper for publishing module assets

git-subtree-dir: Modules/Core
git-subtree-split: 09b7768dc8f4cfc295259a072d76678d5dd12f4a
parent c161ee51
<?php namespace Modules\Core\Console;
use Illuminate\Console\Command;
use Symfony\Component\Console\Input\InputArgument;
class PublishModuleAssetsCommand extends Command
{
protected $name = 'asgard:publish:module';
protected $description = 'Publish module assets';
public function fire()
{
$this->call('module:publish', ['module' => $this->argument('module')]);
}
protected function getArguments()
{
return [
['module', InputArgument::REQUIRED, 'The module name']
];
}
}
...@@ -39,8 +39,8 @@ class PublishThemeAssetsCommand extends Command ...@@ -39,8 +39,8 @@ class PublishThemeAssetsCommand extends Command
protected function getArguments() protected function getArguments()
{ {
return array( return [
array('theme', InputArgument::REQUIRED, 'The theme name') ['theme', InputArgument::REQUIRED, 'The theme name']
); ];
} }
} }
...@@ -4,6 +4,7 @@ use Illuminate\Contracts\Foundation\Application; ...@@ -4,6 +4,7 @@ use Illuminate\Contracts\Foundation\Application;
use Illuminate\Routing\Router; use Illuminate\Routing\Router;
use Illuminate\Support\ServiceProvider; use Illuminate\Support\ServiceProvider;
use Modules\Core\Console\InstallCommand; use Modules\Core\Console\InstallCommand;
use Modules\Core\Console\PublishModuleAssetsCommand;
use Modules\Core\Console\PublishThemeAssetsCommand; use Modules\Core\Console\PublishThemeAssetsCommand;
use Modules\Core\Foundation\Theme\ThemeManager; use Modules\Core\Foundation\Theme\ThemeManager;
use Modules\Core\Services\Composer; use Modules\Core\Services\Composer;
...@@ -83,10 +84,12 @@ class CoreServiceProvider extends ServiceProvider ...@@ -83,10 +84,12 @@ class CoreServiceProvider extends ServiceProvider
{ {
$this->registerInstallCommand(); $this->registerInstallCommand();
$this->registerThemeCommand(); $this->registerThemeCommand();
$this->registerPublishModuleAssetsCommand();
$this->commands([ $this->commands([
'command.asgard.install', 'command.asgard.install',
'command.asgard.publish.theme', 'command.asgard.publish.theme',
'command.asgard.publish.module.assets',
]); ]);
} }
...@@ -111,6 +114,13 @@ class CoreServiceProvider extends ServiceProvider ...@@ -111,6 +114,13 @@ class CoreServiceProvider extends ServiceProvider
}); });
} }
private function registerPublishModuleAssetsCommand()
{
$this->app->bindShared('command.asgard.publish.module.assets', function() {
return new PublishModuleAssetsCommand;
});
}
private function registerMenuRoutes() private function registerMenuRoutes()
{ {
$this->app->bind( $this->app->bind(
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment