Updated Drupal to 8.6. This goes with the following updates because it's possible...
[yaffs-website] / vendor / chi-teck / drupal-code-generator / src / Command / Drupal_8 / Plugin / Field / Type.php
index b16cbb6796de66e3f682bc1785b1a0a196f08dda..ca72da75a4c71320729337594aa7bc4840658ba5 100644 (file)
@@ -6,6 +6,7 @@ use DrupalCodeGenerator\Command\BaseGenerator;
 use DrupalCodeGenerator\Utils;
 use Symfony\Component\Console\Input\InputInterface;
 use Symfony\Component\Console\Output\OutputInterface;
+use Symfony\Component\Console\Question\ConfirmationQuestion;
 
 /**
  * Implements d8:plugin:field:type command.
@@ -22,8 +23,11 @@ class Type extends BaseGenerator {
   protected function interact(InputInterface $input, OutputInterface $output) {
     $questions = Utils::defaultPluginQuestions();
 
+    $questions['configurable_storage'] = new ConfirmationQuestion('Make the field storage configurable?', FALSE);
+    $questions['configurable_instance'] = new ConfirmationQuestion('Make the field instance configurable?', FALSE);
+
     $vars = &$this->collectVars($input, $output, $questions);
-    $vars['class'] = Utils::camelize($vars['plugin_label'] . 'Item');
+    $vars['class'] = Utils::camelize($vars['plugin_label']) . 'Item';
 
     $this->addFile()
       ->path('src/Plugin/Field/FieldType/{class}.php')