You are here

public function WidgetsConfig::validateForm in Entity Browser 8

Same name and namespace in other branches
  1. 8.2 src/Form/WidgetsConfig.php \Drupal\entity_browser\Form\WidgetsConfig::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

src/Form/WidgetsConfig.php, line 207

Class

WidgetsConfig
Form for configuring widgets for entity browser.

Namespace

Drupal\entity_browser\Form

Code

public function validateForm(array &$form, FormStateInterface $form_state) {
  $entity_browser = $this
    ->getEntity();

  /** @var \Drupal\entity_browser\WidgetInterface $widget */
  foreach ($entity_browser
    ->getWidgets() as $widget) {
    $widget
      ->validateConfigurationForm($form, $form_state);
  }
}