X-Git-Url: http://www.aleph1.co.uk/gitweb/?p=yaffs-website;a=blobdiff_plain;f=vendor%2Fchi-teck%2Fdrupal-code-generator%2Fsrc%2FCommand%2FDrupal_8%2FComposer.php;fp=vendor%2Fchi-teck%2Fdrupal-code-generator%2Fsrc%2FCommand%2FDrupal_8%2FComposer.php;h=128aedd5f9f11c9e81df36b36540d606b7a2b1d6;hp=0000000000000000000000000000000000000000;hb=af6d1fb995500ae68849458ee10d66abbdcfb252;hpb=680c79a86e3ed402f263faeac92e89fb6d9edcc0 diff --git a/vendor/chi-teck/drupal-code-generator/src/Command/Drupal_8/Composer.php b/vendor/chi-teck/drupal-code-generator/src/Command/Drupal_8/Composer.php new file mode 100644 index 000000000..128aedd5f --- /dev/null +++ b/vendor/chi-teck/drupal-code-generator/src/Command/Drupal_8/Composer.php @@ -0,0 +1,47 @@ +setValidator([Utils::class, 'validateMachineName']); + $questions['description'] = new Question('Description'); + $questions['type'] = new Question('Type', 'drupal-module'); + $questions['type']->setValidator([Utils::class, 'validateRequired']); + $questions['type']->setAutocompleterValues([ + 'drupal-module', + 'drupal-theme', + 'drupal-library', + 'drupal-profile', + 'drupal-drush', + ]); + $questions['drupal_org'] = new ConfirmationQuestion('Is this project hosted on drupal.org?', FALSE); + + $this->collectVars($input, $output, $questions); + + $this->addFile() + ->path('composer.json') + ->template('d8/composer.twig'); + } + +}