/** * Downloads drupal scaffold files for the current process. */ public function downloadScaffold() { $drupalCorePackage = $this->getDrupalCorePackage(); $installationManager = $this->composer->getInstallationManager(); $corePath = $installationManager->getInstallPath($drupalCorePackage); // Webroot is the parent path of the drupal core installation path. $webroot = dirname($corePath); // Collect excludes. $excludes = $this->getExcludes(); $robo = new RoboRunner(); $robo->execute(array('robo', 'drupal_scaffold:download', $drupalCorePackage->getPrettyVersion(), '--drush', $this->getDrushDir() . '/drush', '--webroot', $webroot, '--excludes', implode(RoboFile::DELIMITER_EXCLUDE, $excludes))); }
/** * Downloads drupal scaffold files for the current process. */ public function downloadScaffold() { $drupalCorePackage = $this->getDrupalCorePackage(); $webroot = $this->getWebRoot(); // Collect options, excludes and settings files. $options = $this->getOptions(); $excludes = $this->getExcludes(); $includes = $this->getIncludes(); // Call any pre-scaffold scripts that may be defined. $dispatcher = new EventDispatcher($this->composer, $this->io); $dispatcher->dispatch(self::PRE_DRUPAL_SCAFFOLD_CMD); // Run Robo $robo = new RoboRunner(); $robo->execute(['robo', 'drupal_scaffold:download', $drupalCorePackage->getPrettyVersion(), '--source', $options['source'], '--webroot', realpath($webroot), '--excludes', static::array_to_csv($excludes), '--includes', static::array_to_csv($includes)]); // Call post-scaffold scripts. $dispatcher->dispatch(self::POST_DRUPAL_SCAFFOLD_CMD); }