public function Slick::getResponsiveOptions in Slick Carousel 8
Same name and namespace in other branches
- 8.2 src/Entity/Slick.php \Drupal\slick\Entity\Slick::getResponsiveOptions()
- 7.3 src/Entity/Slick.php \Drupal\slick\Entity\Slick::getResponsiveOptions()
Returns the Slick responsive settings.
Return value
array The responsive options.
1 call to Slick::getResponsiveOptions()
- Slick::removeDefaultValues in src/
Entity/ Slick.php - Strip out options containing default values so to have real clean JSON.
File
- src/
Entity/ Slick.php, line 198
Class
- Slick
- Defines the Slick configuration entity.
Namespace
Drupal\slick\EntityCode
public function getResponsiveOptions() {
if (empty($this->breakpoints)) {
return FALSE;
}
$options = [];
if (isset($this->options['responsives']['responsive'])) {
$responsives = $this->options['responsives'];
if ($responsives['responsive']) {
foreach ($responsives['responsive'] as $delta => $responsive) {
if (empty($responsives['responsive'][$delta]['breakpoint'])) {
unset($responsives['responsive'][$delta]);
}
if (isset($responsives['responsive'][$delta])) {
$options[$delta] = $responsive;
}
}
}
}
return $options;
}