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
58 lines
1.4 KiB
PHP
58 lines
1.4 KiB
PHP
<?php namespace System\Console;
|
|
|
|
use Symfony\Component\Console\Helper\Table;
|
|
use Symfony\Component\Console\Helper\TableSeparator;
|
|
use System\Models\PluginVersion;
|
|
use Winter\Storm\Console\Command;
|
|
|
|
/**
|
|
* Console command to list existing plugins.
|
|
*
|
|
* @package winter\wn-system-module
|
|
* @author Lucas Zamora
|
|
*/
|
|
class PluginList extends Command
|
|
{
|
|
/**
|
|
* @var string|null The default command name for lazy loading.
|
|
*/
|
|
protected static $defaultName = 'plugin:list';
|
|
|
|
/**
|
|
* @var string The name and signature of this command.
|
|
*/
|
|
protected $signature = 'plugin:list';
|
|
|
|
/**
|
|
* @var string The console command description.
|
|
*/
|
|
protected $description = 'List existing plugins.';
|
|
|
|
/**
|
|
* Execute the console command.
|
|
* @return void
|
|
*/
|
|
public function handle()
|
|
{
|
|
$allPlugins = PluginVersion::all();
|
|
$pluginsCount = count($allPlugins);
|
|
|
|
if ($pluginsCount <= 0) {
|
|
$this->info('No plugin found');
|
|
return;
|
|
}
|
|
|
|
$rows = [];
|
|
foreach ($allPlugins as $plugin) {
|
|
$rows[] = [
|
|
$plugin->code,
|
|
$plugin->version,
|
|
(!$plugin->is_frozen) ? '<info>Yes</info>': '<fg=red>No</>',
|
|
(!$plugin->is_disabled) ? '<info>Yes</info>': '<fg=red>No</>',
|
|
];
|
|
}
|
|
|
|
$this->table(['Plugin name', 'Version', 'Updates enabled', 'Plugin enabled'], $rows);
|
|
}
|
|
}
|