You are here

protected function GridStackEnginePluginBase::itemAttributes in GridStack 8.2

Modifies the .box attributes.

4 calls to GridStackEnginePluginBase::itemAttributes()
BootstrapBase::itemAttributes in src/Plugin/gridstack/engine/BootstrapBase.php
Modifies the .box attributes.
FoundationBase::itemAttributes in src/Plugin/gridstack/engine/FoundationBase.php
Modifies the .box attributes.
GridStackBase::itemAttributes in src/Plugin/gridstack/engine/GridStackBase.php
Modifies the .box attributes.
GridStackEnginePluginBase::modifyItem in src/GridStackEnginePluginBase.php
Modifies item content and attributes.
3 methods override GridStackEnginePluginBase::itemAttributes()
BootstrapBase::itemAttributes in src/Plugin/gridstack/engine/BootstrapBase.php
Modifies the .box attributes.
FoundationBase::itemAttributes in src/Plugin/gridstack/engine/FoundationBase.php
Modifies the .box attributes.
GridStackBase::itemAttributes in src/Plugin/gridstack/engine/GridStackBase.php
Modifies the .box attributes.

File

src/GridStackEnginePluginBase.php, line 427

Class

GridStackEnginePluginBase
Provides base class for all gridstack layout engines.

Namespace

Drupal\gridstack

Code

protected function itemAttributes(array &$attributes, array &$settings) {
  $this
    ->setConfiguration($settings);
  $attributes['class'] = empty($attributes['class']) ? $this->itemClasses : array_merge($attributes['class'], $this->itemClasses);

  // Provides configurable item attributes.
  if ($this->stylizer
    ->getStyle('ete', $settings)) {
    $attributes['class'][] = 'box--ete';
  }
}