/** * Dispatches the vcs repositories event. * * @param array $vcsRepos */ protected function dispatchAddVcsEvent(array $vcsRepos) { if (null !== $this->dispatcher) { $event = new VcsRepositoryEvent(AssetEvents::ADD_VCS_REPOSITORIES, $vcsRepos); $this->dispatcher->dispatch($event->getName(), $event); } }
/** * Downloads drupal scaffold files for the current process. */ public function downloadScaffold() { $drupalCorePackage = $this->getDrupalCorePackage(); $webroot = realpath($this->getWebRoot()); // Collect options, excludes and settings files. $options = $this->getOptions(); $files = array_diff($this->getIncludes(), $this->getExcludes()); // Call any pre-scaffold scripts that may be defined. $dispatcher = new EventDispatcher($this->composer, $this->io); $dispatcher->dispatch(self::PRE_DRUPAL_SCAFFOLD_CMD); $version = $this->getDrupalCoreVersion($drupalCorePackage); $remoteFs = new RemoteFilesystem($this->io); $fetcher = new FileFetcher($remoteFs, $options['source'], $files); $fetcher->fetch($version, $webroot); $initialFileFetcher = new InitialFileFetcher($remoteFs, $options['source'], $this->getInitial()); $initialFileFetcher->fetch($version, $webroot); // Call post-scaffold scripts. $dispatcher->dispatch(self::POST_DRUPAL_SCAFFOLD_CMD); }
/** * 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); }