function EntityDisplayModeAddForm::validateForm

Same name in other branches
  1. 8.9.x core/modules/field_ui/src/Form/EntityDisplayModeAddForm.php \Drupal\field_ui\Form\EntityDisplayModeAddForm::validateForm()
  2. 10 core/modules/field_ui/src/Form/EntityDisplayModeAddForm.php \Drupal\field_ui\Form\EntityDisplayModeAddForm::validateForm()
  3. 11.x core/modules/field_ui/src/Form/EntityDisplayModeAddForm.php \Drupal\field_ui\Form\EntityDisplayModeAddForm::validateForm()

Overrides FormBase::validateForm

File

core/modules/field_ui/src/Form/EntityDisplayModeAddForm.php, line 38

Class

EntityDisplayModeAddForm
Provides the add form for entity display modes.

Namespace

Drupal\field_ui\Form

Code

public function validateForm(array &$form, FormStateInterface $form_state) {
    parent::validateForm($form, $form_state);
    $form_state->setValueForElement($form['id'], $this->targetEntityTypeId . '.' . $form_state->getValue('id'));
}

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