Mercurial > hg > cmmr2012-drupal-site
annotate vendor/chi-teck/drupal-code-generator/src/Command/Drupal_7/ModuleInfo.php @ 5:12f9dff5fda9 tip
Update to Drupal core 8.7.1
author | Chris Cannam |
---|---|
date | Thu, 09 May 2019 15:34:47 +0100 |
parents | c75dbcec494b |
children |
rev | line source |
---|---|
Chris@0 | 1 <?php |
Chris@0 | 2 |
Chris@0 | 3 namespace DrupalCodeGenerator\Command\Drupal_7; |
Chris@0 | 4 |
Chris@0 | 5 use DrupalCodeGenerator\Command\BaseGenerator; |
Chris@0 | 6 use DrupalCodeGenerator\Utils; |
Chris@0 | 7 use Symfony\Component\Console\Input\InputInterface; |
Chris@0 | 8 use Symfony\Component\Console\Output\OutputInterface; |
Chris@0 | 9 use Symfony\Component\Console\Question\Question; |
Chris@0 | 10 |
Chris@0 | 11 /** |
Chris@0 | 12 * Implements d7:module-info command. |
Chris@0 | 13 */ |
Chris@0 | 14 class ModuleInfo extends BaseGenerator { |
Chris@0 | 15 |
Chris@0 | 16 protected $name = 'd7:module-info'; |
Chris@0 | 17 protected $description = 'Generates Drupal 7 info file for a module'; |
Chris@0 | 18 protected $label = 'Info (module)'; |
Chris@0 | 19 |
Chris@0 | 20 /** |
Chris@0 | 21 * {@inheritdoc} |
Chris@0 | 22 */ |
Chris@0 | 23 protected function interact(InputInterface $input, OutputInterface $output) { |
Chris@0 | 24 $questions = Utils::defaultQuestions(); |
Chris@0 | 25 $questions['description'] = new Question('Module description', 'Module description.'); |
Chris@0 | 26 $questions['package'] = new Question('Package', 'Custom'); |
Chris@0 | 27 $this->collectVars($input, $output, $questions); |
Chris@0 | 28 $this->addFile() |
Chris@0 | 29 ->path('{machine_name}.info') |
Chris@0 | 30 ->template('d7/module-info.twig'); |
Chris@0 | 31 } |
Chris@0 | 32 |
Chris@0 | 33 } |