public function SlickForm::cleanFormElements in Slick Carousel 8
Same name and namespace in other branches
- 8.2 slick_ui/src/Form/SlickForm.php \Drupal\slick_ui\Form\SlickForm::cleanFormElements()
- 7.3 slick_ui/src/Form/SlickForm.php \Drupal\slick_ui\Form\SlickForm::cleanFormElements()
Removes problematic options for the responsive Slick.
The problematic options are those that should exist once for a given Slick instance, or no easy way to deal with in the responsive context. JS takes care of the relevant copy on each responsive setting instead.
Return value
array An array of cleaned out options.
1 call to SlickForm::cleanFormElements()
- SlickForm::getResponsiveFormElements in slick_ui/
src/ Form/ SlickForm.php - Defines available options for the responsive Slick.
File
- slick_ui/
src/ Form/ SlickForm.php, line 650
Class
- SlickForm
- Extends base form for slick instance configuration form.
Namespace
Drupal\slick_ui\FormCode
public function cleanFormElements() {
$excludes = [
'accessibility',
'appendArrows',
'appendDots',
'asNavFor',
'dotsClass',
'downArrow',
'downArrowTarget',
'downArrowOffset',
'easing',
'lazyLoad',
'mobileFirst',
'mouseWheel',
'nextArrow',
'prevArrow',
'randomize',
'rtl',
'slide',
'useCSS',
'useTransform',
];
return array_diff_key($this
->getFormElements(), array_combine($excludes, $excludes));
}