Security update for Core, with self-updated composer
[yaffs-website] / vendor / drupal / console / src / Command / Debug / ViewsPluginsCommand.php
similarity index 53%
rename from vendor/drupal/console/src/Command/Views/PluginsDebugCommand.php
rename to vendor/drupal/console/src/Command/Debug/ViewsPluginsCommand.php
index 8e24ef24c83b4cfbbb3990fc9ba939e35224dd5f..3a568b5b94ad70dc966fc2680e839f7bf6f7e5ad 100644 (file)
@@ -2,40 +2,37 @@
 
 /**
  * @file
- * Contains \Drupal\Console\Command\Views\PluginsDebugCommand.
+ * Contains \Drupal\Console\Command\Debug\ViewsPluginsCommand.
  */
 
-namespace Drupal\Console\Command\Views;
+namespace Drupal\Console\Command\Debug;
 
 use Symfony\Component\Console\Input\InputArgument;
 use Symfony\Component\Console\Input\InputInterface;
 use Symfony\Component\Console\Output\OutputInterface;
-use Symfony\Component\Console\Command\Command;
-use Drupal\Console\Core\Command\Shared\ContainerAwareCommandTrait;
-use Drupal\Console\Core\Style\DrupalStyle;
+use Drupal\Console\Core\Command\ContainerAwareCommand;
 use Drupal\views\Views;
 
 /**
- * Class PluginsDebugCommand
+ * Class ViewsPluginsCommand
  *
- * @package Drupal\Console\Command\Views
+ * @package Drupal\Console\Command\Debug
  */
-class PluginsDebugCommand extends Command
+class ViewsPluginsCommand extends ContainerAwareCommand
 {
-    use ContainerAwareCommandTrait;
     /**
      * {@inheritdoc}
      */
     protected function configure()
     {
         $this
-            ->setName('views:plugins:debug')
-            ->setDescription($this->trans('commands.views.plugins.debug.description'))
+            ->setName('debug:views:plugins')
+            ->setDescription($this->trans('commands.debug.views.plugins.description'))
             ->addArgument(
                 'type',
                 InputArgument::OPTIONAL,
-                $this->trans('commands.views.plugins.debug.arguments.type')
-            );
+                $this->trans('commands.debug.views.plugins.arguments.type')
+            )->setAliases(['dvp']);
     }
 
     /**
@@ -43,17 +40,15 @@ class PluginsDebugCommand extends Command
      */
     protected function execute(InputInterface $input, OutputInterface $output)
     {
-        $io = new DrupalStyle($input, $output);
         $type = $input->getArgument('type');
 
-        $this->pluginList($io, $type);
+        $this->pluginList($type);
     }
 
     /**
-     * @param \Drupal\Console\Core\Style\DrupalStyle $io
      * @param $type
      */
-    protected function pluginList(DrupalStyle $io, $type)
+    protected function pluginList($type)
     {
         $plugins = Views::pluginList();
 
@@ -76,12 +71,12 @@ class PluginsDebugCommand extends Command
 
 
         $tableHeader = [
-          $this->trans('commands.views.plugins.debug.messages.type'),
-          $this->trans('commands.views.plugins.debug.messages.name'),
-          $this->trans('commands.views.plugins.debug.messages.provider'),
-          $this->trans('commands.views.plugins.debug.messages.views'),
+          $this->trans('commands.debug.views.plugins.messages.type'),
+          $this->trans('commands.debug.views.plugins.messages.name'),
+          $this->trans('commands.debug.views.plugins.messages.provider'),
+          $this->trans('commands.debug.views.plugins.messages.views'),
         ];
 
-        $io->table($tableHeader, $rows, 'compact');
+        $this->getIo()->table($tableHeader, $rows, 'compact');
     }
 }