388f6cfeaeff02b6e2a058b02d4086d3f7dd5d21
[yaffs-website] / vendor / chi-teck / drupal-code-generator / src / Command / Drupal_8 / ModuleFile.php
1 <?php
2
3 namespace DrupalCodeGenerator\Command\Drupal_8;
4
5 use DrupalCodeGenerator\Command\BaseGenerator;
6 use DrupalCodeGenerator\Utils;
7 use Symfony\Component\Console\Input\InputInterface;
8 use Symfony\Component\Console\Output\OutputInterface;
9
10 /**
11  * Implements d8:module-file command.
12  */
13 class ModuleFile extends BaseGenerator {
14
15   protected $name = 'd8:module-file';
16   protected $description = 'Generates a module file';
17   protected $alias = 'module-file';
18
19   /**
20    * {@inheritdoc}
21    */
22   protected function interact(InputInterface $input, OutputInterface $output) {
23     $this->collectVars($input, $output, Utils::defaultQuestions());
24     $this->addFile()
25       ->path('{machine_name}.module')
26       ->template('d8/module.twig');
27   }
28
29 }