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 / Filter.php
index 93d28bdff769f786d239cfd48093b25f223554da..1c5a1110dcd05ac531050392b463188c2c2ba7b8 100644 (file)
@@ -29,10 +29,7 @@ class Filter extends BaseGenerator {
       'TYPE_TRANSFORM_IRREVERSIBLE' => 'Irreversible transformation',
       'TYPE_TRANSFORM_REVERSIBLE' => 'Reversible transformation',
     ];
-    $choices = array_values($filter_types);
-    // Start choices list form '1'.
-    array_unshift($choices, NULL);
-    unset($choices[0]);
+    $choices = Utils::prepareChoices($filter_types);
     $questions['filter_type'] = new ChoiceQuestion('Filter type', $choices);
 
     $vars = &$this->collectVars($input, $output, $questions);