Version 1
[yaffs-website] / vendor / drupal / console-core / src / Command / CompleteCommand.php
diff --git a/vendor/drupal/console-core/src/Command/CompleteCommand.php b/vendor/drupal/console-core/src/Command/CompleteCommand.php
new file mode 100644 (file)
index 0000000..521ec9c
--- /dev/null
@@ -0,0 +1,40 @@
+<?php
+
+/**
+ * @file
+ * Contains \Drupal\Console\Core\CompleteCommand.
+ */
+
+namespace Drupal\Console\Core\Command;
+
+use Symfony\Component\Console\Input\InputInterface;
+use Symfony\Component\Console\Output\OutputInterface;
+use Symfony\Component\Console\Command\Command;
+use Drupal\Console\Core\Command\Shared\CommandTrait;
+
+class CompleteCommand extends Command
+{
+    use CommandTrait;
+
+    /**
+     * {@inheritdoc}
+     */
+    protected function configure()
+    {
+        $this
+            ->setName('complete')
+            ->setDescription($this->trans('commands.complete.description'));
+    }
+
+    /**
+     * {@inheritdoc}
+     */
+    protected function execute(InputInterface $input, OutputInterface $output)
+    {
+        $commands = array_keys($this->getApplication()->all());
+        asort($commands);
+        $output->writeln($commands);
+
+        return 0;
+    }
+}