public function EntityDisplayModeAddForm::validateForm in Drupal 8
Same name and namespace in other branches
- 9 core/modules/field_ui/src/Form/EntityDisplayModeAddForm.php \Drupal\field_ui\Form\EntityDisplayModeAddForm::validateForm()
- 10 core/modules/field_ui/src/Form/EntityDisplayModeAddForm.php \Drupal\field_ui\Form\EntityDisplayModeAddForm::validateForm()
Form validation handler.
Parameters
array $form: An associative array containing the structure of the form.
\Drupal\Core\Form\FormStateInterface $form_state: The current state of the form.
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\FormCode
public function validateForm(array &$form, FormStateInterface $form_state) {
parent::validateForm($form, $form_state);
$form_state
->setValueForElement($form['id'], $this->targetEntityTypeId . '.' . $form_state
->getValue('id'));
}