You are here

public function Slideshow::submitOptionsForm in Views Slideshow 8.3

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

Handle any special handling on the validate form.

Overrides PluginBase::submitOptionsForm

File

src/Plugin/views/style/Slideshow.php, line 307
Contains \Drupal\views_slideshow\Plugin\views\style\Slideshow.

Class

Slideshow
Style plugin to render each item in a grid cell.

Namespace

Drupal\views_slideshow\Plugin\views\style

Code

public function submitOptionsForm(&$form, FormStateInterface $form_state) {
  $arguments = array(
    $form,
    &$form_state,
  );

  // Call all modules that use hook_views_slideshow_options_form_submit
  foreach (\Drupal::moduleHandler()
    ->getImplementations('views_slideshow_options_form_submit') as $module) {
    $function = $module . '_views_slideshow_options_form_submit';
    call_user_func_array($function, $arguments);
  }

  // In addition to the skin, we also pre-save the definition that
  // correspond to it.  That lets us avoid a hook lookup on every page.
  $skins = $this
    ->getSkins();
  $form_state
    ->setValue(array(
    'style_options',
    'skin_info',
  ), $skins[$form_state
    ->getValue(array(
    'style_options',
    'slideshow_skin',
  ))]);
}