Version 1
[yaffs-website] / web / core / lib / Drupal / Core / Form / BaseFormIdInterface.php
diff --git a/web/core/lib/Drupal/Core/Form/BaseFormIdInterface.php b/web/core/lib/Drupal/Core/Form/BaseFormIdInterface.php
new file mode 100644 (file)
index 0000000..de0c998
--- /dev/null
@@ -0,0 +1,21 @@
+<?php
+
+namespace Drupal\Core\Form;
+
+/**
+ * Provides an interface for a Form that has a base form ID.
+ *
+ * This will become the $form_state->getBaseInfo()['base_form_id'] used to
+ * generate the name of hook_form_BASE_FORM_ID_alter().
+ */
+interface BaseFormIdInterface extends FormInterface {
+
+  /**
+   * Returns a string identifying the base form.
+   *
+   * @return string|null
+   *   The string identifying the base form or NULL if this is not a base form.
+   */
+  public function getBaseFormId();
+
+}