Updated to Drupal 8.5. Core Media not yet in use.
[yaffs-website] / vendor / chi-teck / drupal-code-generator / src / Command / Drupal_8 / Form / Simple.php
diff --git a/vendor/chi-teck/drupal-code-generator/src/Command/Drupal_8/Form/Simple.php b/vendor/chi-teck/drupal-code-generator/src/Command/Drupal_8/Form/Simple.php
new file mode 100644 (file)
index 0000000..6a5b63f
--- /dev/null
@@ -0,0 +1,30 @@
+<?php
+
+namespace DrupalCodeGenerator\Command\Drupal_8\Form;
+
+use Symfony\Component\Console\Input\InputInterface;
+use Symfony\Component\Console\Output\OutputInterface;
+
+/**
+ * Implements d8:form:simple command.
+ */
+class Simple extends Base {
+
+  protected $name = 'd8:form:simple';
+  protected $description = 'Generates simple form';
+  protected $alias = 'form-simple';
+
+  /**
+   * {@inheritdoc}
+   */
+  protected function interact(InputInterface $input, OutputInterface $output) {
+    $options = [
+      'default_class' => 'ExampleForm',
+      'default_form_id' => '{machine_name}_example',
+      'default_permission' => 'access content',
+      'template' => 'd8/form/simple.twig',
+    ];
+    $this->doInteract($input, $output, $options);
+  }
+
+}