+
+ protected function definePaths($vendorDir)
+ {
+ $this->consoleCorePath = "/{$vendorDir}/drupal/console-core/";
+ $this->consolePath = "/{$vendorDir}/drupal/console/";
+ $this->consoleLanguagePath = "/{$vendorDir}/drupal/console-%s/translations/";
+ }
+
+ protected function defineConstants($vendorDir)
+ {
+ if (!defined("DRUPAL_CONSOLE_CORE")) {
+ define(
+ "DRUPAL_CONSOLE_CORE",
+ "/{$vendorDir}/drupal/console-core/"
+ );
+ }
+ if (!defined("DRUPAL_CONSOLE")) {
+ define("DRUPAL_CONSOLE", "/{$vendorDir}/drupal/console/");
+ }
+ if (!defined("DRUPAL_CONSOLE_LANGUAGE")) {
+ define(
+ "DRUPAL_CONSOLE_LANGUAGE",
+ "/{$vendorDir}/drupal/console-%s/translations/"
+ );
+ }
+
+ if (!defined("DRUPAL_CONSOLE_LIBRARY")) {
+ define(
+ "DRUPAL_CONSOLE_LIBRARY",
+ "/{$vendorDir}/drupal/%s/console/translations/%s"
+ );
+ }
+ }
+
+ /**
+ * @return string
+ */
+ public function getConsoleCorePath()
+ {
+ return $this->consoleCorePath;
+ }
+
+ /**
+ * @return string
+ */
+ public function getConsolePath()
+ {
+ return $this->consolePath;
+ }
+
+ /**
+ * @return string
+ */
+ public function getConsoleLanguagePath()
+ {
+ return $this->consoleLanguagePath;
+ }
+
+ public function isValidDrupal() {
+ return ($this->getComposerRoot() && $this->getDrupalRoot());
+ }