Some checks are pending
Module sub-split / Sub-split (push) Waiting to run
- Base: wintercms/winter branch 1.2 (full framework) - Theme vivespos: Canvas 7 + Bootstrap 5 CDN, custom CSS - Layout: deferred GTM/GA4 tracking, JSON-LD SoftwareApplication - Partials: hero (offline-first), features, modes (offline/nube toggle), screenshots, pricing (3 planes), comparison, FAQ, CTA - Plugin VivesPOS.Site with ContactForm - Dockerfile: PHP 8.2 Apache, port 80, healthcheck - Added winter/wn-pages, blog, sitemap, seo plugins - Active theme set to vivespos
53 lines
1.3 KiB
PHP
53 lines
1.3 KiB
PHP
<?php namespace System\Console;
|
|
|
|
use Winter\Storm\Console\Command;
|
|
use System\Classes\PluginManager;
|
|
use System\Models\PluginVersion;
|
|
|
|
/**
|
|
* Console command to enable a plugin.
|
|
*
|
|
* @package winter\wn-system-module
|
|
* @author Lucas Zamora
|
|
*/
|
|
class PluginEnable extends Command
|
|
{
|
|
use Traits\HasPluginArgument;
|
|
|
|
/**
|
|
* @var string Only suggest plugins that are disabled
|
|
*/
|
|
protected $hasPluginsFilter = 'disabled';
|
|
|
|
/**
|
|
* @var string|null The default command name for lazy loading.
|
|
*/
|
|
protected static $defaultName = 'plugin:enable';
|
|
|
|
/**
|
|
* @var string The name and signature of this command.
|
|
*/
|
|
protected $signature = 'plugin:enable
|
|
{plugin : The plugin to disable. <info>(eg: Winter.Blog)</info>}';
|
|
|
|
/**
|
|
* @var string The console command description.
|
|
*/
|
|
protected $description = 'Enable an existing plugin.';
|
|
|
|
/**
|
|
* Execute the console command.
|
|
* @return void
|
|
*/
|
|
public function handle()
|
|
{
|
|
$pluginName = $this->getPluginIdentifier();
|
|
$pluginManager = PluginManager::instance();
|
|
|
|
// Enable this plugin
|
|
$pluginManager->enablePlugin($pluginName);
|
|
|
|
$this->output->writeln(sprintf('<info>%s:</info> enabled.', $pluginName));
|
|
}
|
|
}
|