df0a3aebe2f0543472b8e78c57e4edf9eb9ae1ca
[yaffs-website] / vendor / drupal / console / templates / module / src / Entity / Form / entity-settings.php.twig
1 {% extends "base/class.php.twig" %}
2
3 {% block file_path %}
4 \Drupal\{{module}}\Form\{{ entity_class }}SettingsForm.
5 {% endblock %}
6
7 {% block namespace_class %}
8 namespace Drupal\{{module}}\Form;
9 {% endblock %}
10
11 {% block use_class %}
12 use Drupal\Core\Form\FormBase;
13 use Drupal\Core\Form\FormStateInterface;
14 {% endblock %}
15
16 {% block class_declaration %}
17 /**
18  * Class {{ entity_class }}SettingsForm.
19  *
20  * @package Drupal\{{module}}\Form
21  *
22  * @ingroup {{module}}
23  */
24 class {{ entity_class }}SettingsForm extends FormBase {% endblock %}
25 {% block class_methods %}
26   /**
27    * Returns a unique string identifying the form.
28    *
29    * @return string
30    *   The unique string identifying the form.
31    */
32   public function getFormId() {
33     return '{{ entity_class }}_settings';
34   }
35
36   /**
37    * Form submission handler.
38    *
39    * @param array $form
40    *   An associative array containing the structure of the form.
41    * @param \Drupal\Core\Form\FormStateInterface $form_state
42    *   The current state of the form.
43    */
44   public function submitForm(array &$form, FormStateInterface $form_state) {
45     // Empty implementation of the abstract submit class.
46   }
47
48   /**
49    * Defines the settings form for {{ label }} entities.
50    *
51    * @param array $form
52    *   An associative array containing the structure of the form.
53    * @param \Drupal\Core\Form\FormStateInterface $form_state
54    *   The current state of the form.
55    *
56    * @return array
57    *   Form definition array.
58    */
59   public function buildForm(array $form, FormStateInterface $form_state) {
60     $form['{{ entity_class }}_settings']['#markup'] = 'Settings form for {{ label }} entities. Manage field settings here.';
61     return $form;
62   }
63 {% endblock %}