1 {% extends "base/class.php.twig" %}
4 \Drupal\{{module}}\Form\{{ entity_class }}SettingsForm.
7 {% block namespace_class %}
8 namespace Drupal\{{module}}\Form;
12 use Drupal\Core\Form\FormBase;
13 use Drupal\Core\Form\FormStateInterface;
16 {% block class_declaration %}
18 * Class {{ entity_class }}SettingsForm.
20 * @package Drupal\{{module}}\Form
24 class {{ entity_class }}SettingsForm extends FormBase {% endblock %}
25 {% block class_methods %}
27 * Returns a unique string identifying the form.
30 * The unique string identifying the form.
32 public function getFormId() {
33 return '{{ entity_class }}_settings';
37 * Form submission handler.
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.
44 public function submitForm(array &$form, FormStateInterface $form_state) {
45 // Empty implementation of the abstract submit class.
49 * Defines the settings form for {{ label }} entities.
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.
57 * Form definition array.
59 public function buildForm(array $form, FormStateInterface $form_state) {
60 $form['{{ entity_class }}_settings']['#markup'] = 'Settings form for {{ label }} entities. Manage field settings here.';