You are here

protected function GridStackEnginePluginBase::setStyles in GridStack 8.2

Sets the styles, might be string, or array.

1 call to GridStackEnginePluginBase::setStyles()
GridStackEnginePluginBase::attributes in src/GridStackEnginePluginBase.php
Provides both CSS grid and js-driven attributes configurable via UI.

File

src/GridStackEnginePluginBase.php, line 179

Class

GridStackEnginePluginBase
Provides base class for all gridstack layout engines.

Namespace

Drupal\gridstack

Code

protected function setStyles(array $data) {
  $id = $this
    ->getPluginId() . '-' . $this
    ->getOptionset()
    ->id();
  $this->styles[Blazy::getHtmlId('gridstack', $id)][$data['context']] = $data['rules'];
  return $this;
}