-
Notifications
You must be signed in to change notification settings - Fork 576
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add back twill:module command as deprecated
Will be removed in Twill 3.0 in favor of twill:make:module
- Loading branch information
Showing
2 changed files
with
49 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
<?php | ||
|
||
namespace A17\Twill\Commands; | ||
|
||
use Illuminate\Support\Str; | ||
|
||
class ModuleMakeDeprecated extends Command | ||
{ | ||
/** | ||
* The name and signature of the console command. | ||
* | ||
* @var string | ||
*/ | ||
protected $signature = 'twill:module {moduleName} | ||
{--B|hasBlocks} | ||
{--T|hasTranslation} | ||
{--S|hasSlug} | ||
{--M|hasMedias} | ||
{--F|hasFiles} | ||
{--P|hasPosition} | ||
{--R|hasRevisions} | ||
{--all}'; | ||
|
||
/** | ||
* The console command description. | ||
* | ||
* @var string | ||
*/ | ||
protected $description = 'Create a new Twill Module (deprecated, use twill:make:module)'; | ||
|
||
/** | ||
* Executes the console command. | ||
* | ||
* @return mixed | ||
*/ | ||
public function handle() | ||
{ | ||
$this->call('twill:make:module', [ | ||
'moduleName' => $this->argument('moduleName'), | ||
] + collect($this->options())->mapWithKeys(function ($value, $key) { | ||
return ["--{$key}" => $value]; | ||
})->toArray()); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters