mirror of
https://github.com/InvoiceShelf/InvoiceShelf.git
synced 2026-09-01 21:00:58 +00:00
37 lines
809 B
PHP
37 lines
809 B
PHP
<?php
|
|
|
|
namespace App\Platform\Modules\Console;
|
|
|
|
use App\Platform\Modules\Runtime\ModuleInstaller;
|
|
use Illuminate\Console\Command;
|
|
|
|
/**
|
|
* Finishes an installation whose module files are already sitting on disk.
|
|
*/
|
|
class InstallModuleCommand extends Command
|
|
{
|
|
/** @var string */
|
|
protected $signature = 'install:module {module} {version}';
|
|
|
|
/** @var string */
|
|
protected $description = 'Install cloned module.';
|
|
|
|
public function __construct()
|
|
{
|
|
parent::__construct();
|
|
}
|
|
|
|
/**
|
|
* Hand the module name and version to the runtime installer.
|
|
*/
|
|
public function handle(): int
|
|
{
|
|
$name = $this->argument('module');
|
|
$version = $this->argument('version');
|
|
|
|
ModuleInstaller::complete($name, $version);
|
|
|
|
return self::SUCCESS;
|
|
}
|
|
}
|