You are here

public function Slideshow::validateOptionsForm in Views Slideshow 8.4

Same name and namespace in other branches
  1. 8.3 src/Plugin/views/style/Slideshow.php \Drupal\views_slideshow\Plugin\views\style\Slideshow::validateOptionsForm()

Validate the options form.

Overrides StylePluginBase::validateOptionsForm

File

src/Plugin/views/style/Slideshow.php, line 303

Class

Slideshow
Style plugin to render each item in a slideshow.

Namespace

Drupal\views_slideshow\Plugin\views\style

Code

public function validateOptionsForm(&$form, FormStateInterface $form_state) {

  // Validate all slideshow type plugins values.
  $typeManager = \Drupal::service('plugin.manager.views_slideshow.slideshow_type');
  foreach ($typeManager
    ->getDefinitions() as $id => $definition) {
    $type = $typeManager
      ->createInstance($id);
    $type
      ->validateConfigurationForm($form, $form_state);
  }
}