interface BaseFormIdInterface

Same name in other branches
  1. 9 core/lib/Drupal/Core/Form/BaseFormIdInterface.php \Drupal\Core\Form\BaseFormIdInterface
  2. 10 core/lib/Drupal/Core/Form/BaseFormIdInterface.php \Drupal\Core\Form\BaseFormIdInterface
  3. 11.x core/lib/Drupal/Core/Form/BaseFormIdInterface.php \Drupal\Core\Form\BaseFormIdInterface

Provides an interface for a Form that has a base form ID.

This will become the $form_state->getBuildInfo()['base_form_id'] used to generate the name of hook_form_BASE_FORM_ID_alter().

Hierarchy

Expanded class hierarchy of BaseFormIdInterface

All classes that implement BaseFormIdInterface

5 files declare their use of BaseFormIdInterface
AddFormBase.php in core/modules/media_library/src/Form/AddFormBase.php
ConfigTranslationFormBase.php in core/modules/config_translation/src/Form/ConfigTranslationFormBase.php
ConfigureBlockFormBase.php in core/modules/layout_builder/src/Form/ConfigureBlockFormBase.php
DeleteMultipleForm.php in core/lib/Drupal/Core/Entity/Form/DeleteMultipleForm.php
EntityFormInterface.php in core/lib/Drupal/Core/Entity/EntityFormInterface.php

File

core/lib/Drupal/Core/Form/BaseFormIdInterface.php, line 11

Namespace

Drupal\Core\Form
View source
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();

}

Members

Title Sort descending Modifiers Object type Summary Overrides
BaseFormIdInterface::getBaseFormId public function Returns a string identifying the base form. 5
FormInterface::buildForm public function Form constructor. 191
FormInterface::getFormId public function Returns a unique string identifying the form. 264
FormInterface::submitForm public function Form submission handler. 213
FormInterface::validateForm public function Form validation handler. 30

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.