You are here

public function GridStack::setOption in GridStack 8

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 GridStackInterface::setOption

File

src/Entity/GridStack.php, line 128

Class

GridStack
Defines the GridStack configuration entity.

Namespace

Drupal\gridstack\Entity

Code

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