Exemple #1
0
    /**
     * Execute the console command.
     *
     * @return void
     */
    public function fire()
    {
        /** @var $plugin PluginBootstrap */
        \PluginManager::sync();
        if ($collection = \PluginManager::getPluginCollection() and count($collection) > 0) {
            /** @var Table $table */
            $table = new Table($this->getOutput());
            $table->setHeaders(['name', 'version', 'description', 'active', 'installed']);
            $rows = [];
            foreach ($collection as $plugin) {
                $rows[] = [$plugin->getName(), $plugin->getVersion(), $plugin->getDescription(), $plugin->isActive() ? 'yes' : 'no', $plugin->isInstalled() ? 'yes' : 'no'];
            }
            $table->setRows($rows);
            $table->render();
        } else {
            $line = <<<EVO
<info>no plugins avalaible</info>
EVO;
            $this->line($line);
        }
        /*$this->line(<<<EOF
        The <info>%command.name%</info> command lists all commands:
        
            <info>php %command.full_name%</info>
        
        You can also display the commands for a specific namespace:
        EOF
        );*/
        //$this->line('Alle Plugins.asdkjashdkash');
    }