public function FlexiformEntityFormDisplay::formValidateComponents in Flexiform 8
File
- src/
FlexiformEntityFormDisplay.php, line 355
Class
- FlexiformEntityFormDisplay
- Defines a class to extend EntityFormDisplays.
Namespace
Drupal\flexiformCode
public function formValidateComponents(array $form, FormStateInterface $form_state) {
$form_state = $this
->decorateFormState($form, $form_state);
foreach ($this
->getComponents() as $name => $options) {
if ($component = $this
->getComponentPlugin($name, $options, $form_state
->getFormEntityManager())) {
if ($component instanceof FormComponentWithValidateInterface) {
$component
->formValidate($form[$name], $form_state);
}
}
}
}