You are here

public function ConfigureStyles::validateForm in Block Style Plugins 8.2

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/ConfigureStyles.php, line 175

Class

ConfigureStyles
Provides a form to configure styles.

Namespace

Drupal\block_style_plugins\Form

Code

public function validateForm(array &$form, FormStateInterface $form_state) {
  if ($this->blockStyles instanceof PluginFormInterface) {
    $subform_state = SubformState::createForSubform($form['settings'], $form, $form_state);
    $this
      ->getPluginForm($this->blockStyles)
      ->validateConfigurationForm($form['settings'], $subform_state);
  }
}