class FormBase

Base form alter class.

Hierarchy

Expanded class hierarchy of FormBase

Related topics

Namespace

Drupal\bootstrap\Plugin\Form
Source
class FormBase extends PluginBase implements FormInterface {

  /**
   * {@inheritdoc}
   */
  public function alterForm(array &$form, FormStateInterface $form_state, $form_id = NULL) {
    $this->alterFormElement(Element::create($form), $form_state, $form_id);
  }

  /**
   * {@inheritdoc}
   */
  public function alterFormElement(Element $form, FormStateInterface $form_state, $form_id = NULL) {
  }

  /**
   * {@inheritdoc}
   */
  public static function submitForm(array &$form, FormStateInterface $form_state) {
    static::submitFormElement(Element::create($form), $form_state);
  }

  /**
   * {@inheritdoc}
   */
  public static function submitFormElement(Element $form, FormStateInterface $form_state) {
  }

  /**
   * {@inheritdoc}
   */
  public static function validateForm(array &$form, FormStateInterface $form_state) {
    static::validateFormElement(Element::create($form), $form_state);
  }

  /**
   * {@inheritdoc}
   */
  public static function validateFormElement(Element $form, FormStateInterface $form_state) {
  }

}

Members

Contains filters are case sensitive
Namesort descending Modifiers Type Description
FormBase::alterForm public function The alter method to store the code. Overrides FormInterface::alterForm
FormBase::alterFormElement public function The alter method to store the code. Overrides FormInterface::alterFormElement
FormBase::submitForm public static function Form submission handler. Overrides FormInterface::submitForm
FormBase::submitFormElement public static function Form submission handler. Overrides FormInterface::submitFormElement
FormBase::validateForm public static function Form validation handler. Overrides FormInterface::validateForm
FormBase::validateFormElement public static function Form validation handler. Overrides FormInterface::validateFormElement
PluginBase::$theme protected property The currently set theme object.
PluginBase::__construct public function