public function JqueryCarousel::buildOptionsForm in jQuery carousel 8
Provide a form to edit options for this plugin.
Overrides StylePluginBase::buildOptionsForm
File
- src/
Plugin/ views/ style/ JqueryCarousel.php, line 47
Class
- JqueryCarousel
- Style plugin to render each item in a grid cell.
Namespace
Drupal\jquery_carousel\Plugin\views\styleCode
public function buildOptionsForm(&$form, FormStateInterface $form_state) {
parent::buildOptionsForm($form, $form_state);
$carousel_config_form = jquery_carousel_config_form();
$form = array_merge($form, $carousel_config_form);
foreach (array_keys($form) as $key) {
if (isset($form[$key]) && is_array($form[$key]) && isset($this->options[$key])) {
$form[$key]['#default_value'] = $this->options[$key];
}
}
}