This repository has been archived on 2025-01-19. You can view files and clone it, but you cannot make any changes to it's state, such as pushing and creating new issues, pull requests or comments.
drupalcampbristol/vendor/drupal-composer/drupal-scaffold/src/DrupalScaffoldCommand.php
2018-11-23 12:29:20 +00:00

36 lines
885 B
PHP

<?php
namespace DrupalComposer\DrupalScaffold;
use Composer\Command\BaseCommand;
use Symfony\Component\Console\Input\InputInterface;
use Symfony\Component\Console\Output\OutputInterface;
/**
* The "drupal:scaffold" command class.
*
* Downloads scaffold files and generates the autoload.php file.
*/
class DrupalScaffoldCommand extends BaseCommand {
/**
* {@inheritdoc}
*/
protected function configure() {
parent::configure();
$this
->setName('drupal:scaffold')
->setDescription('Update the Drupal scaffold files.');
}
/**
* {@inheritdoc}
*/
protected function execute(InputInterface $input, OutputInterface $output) {
$handler = new Handler($this->getComposer(), $this->getIO());
$handler->downloadScaffold();
// Generate the autoload.php file after generating the scaffold files.
$handler->generateAutoload();
}
}