Pull merge.
[yaffs-website] / vendor / drupal-composer / drupal-scaffold / src / DrupalScaffoldCommand.php
1 <?php
2
3 namespace DrupalComposer\DrupalScaffold;
4
5 use Composer\Command\BaseCommand;
6 use Symfony\Component\Console\Input\InputInterface;
7 use Symfony\Component\Console\Output\OutputInterface;
8
9 /**
10  * The "drupal:scaffold" command class.
11  *
12  * Downloads scaffold files and generates the autoload.php file.
13  */
14 class DrupalScaffoldCommand extends BaseCommand {
15
16   /**
17    * {@inheritdoc}
18    */
19   protected function configure() {
20     parent::configure();
21     $this
22       ->setName('drupal:scaffold')
23       ->setDescription('Update the Drupal scaffold files.');
24   }
25
26   /**
27    * {@inheritdoc}
28    */
29   protected function execute(InputInterface $input, OutputInterface $output) {
30     $handler = new Handler($this->getComposer(), $this->getIO());
31     $handler->downloadScaffold();
32     // Generate the autoload.php file after generating the scaffold files.
33     $handler->generateAutoload();
34   }
35
36 }