-
Notifications
You must be signed in to change notification settings - Fork 45
Expand file tree
/
Copy pathDrupalScaffoldCommand.php
More file actions
40 lines (34 loc) · 1.08 KB
/
Copy pathDrupalScaffoldCommand.php
File metadata and controls
40 lines (34 loc) · 1.08 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
<?php
namespace DrupalComposer\DrupalScaffold;
use Composer\Command\BaseCommand;
use Symfony\Component\Console\Input\InputInterface;
use Symfony\Component\Console\Input\InputOption;
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.')
->setDefinition(array(
new InputOption('no-dev', NULL, InputOption::VALUE_NONE, 'Disables download of include-dev files.'),
));
}
/**
* {@inheritdoc}
*/
protected function execute(InputInterface $input, OutputInterface $output) {
$handler = new Handler($this->getComposer(), $this->getIO());
$handler->downloadScaffold(!$input->getOption('no-dev'));
// Generate the autoload.php file after generating the scaffold files.
$handler->generateAutoload();
}
}