You are here

public function SourceOverviewForm::validateForm in Translation Management Tool 8

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/SourceOverviewForm.php, line 237

Class

SourceOverviewForm
Source overview form.

Namespace

Drupal\tmgmt\Form

Code

public function validateForm(array &$form, FormStateInterface $form_state) {
  $plugin = $form_state
    ->get('plugin');
  $item_type = $form_state
    ->get('item_type');

  // Execute the validation method on the source plugin controller.
  $source_ui = $this->sourceManager
    ->createUIInstance($plugin);
  $source_ui
    ->overviewFormValidate($form, $form_state, $item_type);
}