You are here

public function GridStackBase::setOption in GridStack 8.2

Sets the value of a gridstack option.

Parameters

string $name: The option name: settings, icon, use_framework, breakpoints.

string $value: The option value.

Return value

$this The class is being called.

Overrides GridStackBaseInterface::setOption

File

src/Entity/GridStackBase.php, line 118

Class

GridStackBase
Defines the base class for GridStack configuration entity.

Namespace

Drupal\gridstack\Entity

Code

public function setOption($group, $value) {
  $value = $group == 'settings' && isset($this->options[$group]) ? array_merge($this->options[$group], $value) : $value;
  $this->options[$group] = $value;
  return $this;
}