Updated to Drupal 8.5. Core Media not yet in use.
[yaffs-website] / vendor / drupal / console-core / src / Command / Command.php
index 7772f497883c9df992ca76e15b80b9b17723ddde..509a68c4008c3798ac6b0f1b0976cf70a3ce3c8a 100644 (file)
@@ -12,6 +12,7 @@ use Symfony\Component\Console\Input\InputInterface;
 use Symfony\Component\Console\Output\OutputInterface;
 use Drupal\Console\Core\Command\Shared\CommandTrait;
 use Drupal\Console\Core\Style\DrupalStyle;
+use Drupal\Console\Core\Utils\DrupalFinder;
 
 /**
  * Class Command
@@ -22,6 +23,11 @@ abstract class Command extends BaseCommand
 {
     use CommandTrait;
 
+    /**
+     * @var DrupalFinder;
+     */
+    protected $drupalFinder;
+
     /**
      * @var DrupalStyle
      */
@@ -42,4 +48,16 @@ abstract class Command extends BaseCommand
     {
         return $this->io;
     }
+
+    public function createException($message) {
+        $this->getIo()->error($message);
+        exit(1);
+    }
+
+    /**
+     * @param \Drupal\Console\Core\Utils\DrupalFinder $drupalFinder
+     */
+    public function setDrupalFinder($drupalFinder) {
+        $this->drupalFinder = $drupalFinder;
+    }
 }