You are here

protected function StyleBase::extraAttributes in GridStack 8.2

Modifies any attributes relevant to use backgrounds.

1 call to StyleBase::extraAttributes()
StyleBase::attributes in src/Plugin/gridstack/stylizer/StyleBase.php
Provides both CSS grid and js-driven attributes configurable via UI.

File

src/Plugin/gridstack/stylizer/StyleBase.php, line 192

Class

StyleBase
Provides the base styles.

Namespace

Drupal\gridstack\Plugin\gridstack\stylizer

Code

protected function extraAttributes(array &$attributes, array $settings) {
  if ($extras = $this
    ->getStyle('all', $settings, 'extras')) {
    foreach (array_keys($extras) as $key) {
      $attributes['class'][] = 'is-gs-' . $key;
    }
  }
}