You are here

public function SlickBase::getOptions in Slick Carousel 7.3

Same name and namespace in other branches
  1. 8.2 src/Entity/SlickBase.php \Drupal\slick\Entity\SlickBase::getOptions()

Returns the Slick options by group, or property.

Parameters

string $group: The name of setting group: settings, responsives.

string $property: The name of specific property: prevArrow, nexArrow.

Return value

mixed|array|null Available options by $group, $property, all, or NULL.

Overrides SlickBaseInterface::getOptions

File

src/Entity/SlickBase.php, line 170

Class

SlickBase
Defines the Slick configuration entity.

Namespace

Drupal\slick\Entity

Code

public function getOptions($group = NULL, $property = NULL) {
  if ($group) {
    if (is_array($group)) {
      return NestedArray::getValue($this->options, (array) $group);
    }
    elseif (isset($property) && isset($this->options[$group])) {
      return isset($this->options[$group][$property]) ? $this->options[$group][$property] : NULL;
    }
    return isset($this->options[$group]) ? $this->options[$group] : NULL;
  }
  return $this->options;
}