public function SlickForm::cleanFormElements in Slick Carousel 7.3
Same name and namespace in other branches
- 8.2 slick_ui/src/Form/SlickForm.php \Drupal\slick_ui\Form\SlickForm::cleanFormElements()
- 8 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 723
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',
'slide',
'useCSS',
'useTransform',
];
return array_diff_key($this
->getFormElements(), array_combine($excludes, $excludes));
}