You are here

protected function GridStackEnginePluginBase::modifyItem in GridStack 8.2

Modifies item content and attributes.

1 call to GridStackEnginePluginBase::modifyItem()
GridStackEnginePluginBase::buildItem in src/GridStackEnginePluginBase.php
Returns an individual item.

File

src/GridStackEnginePluginBase.php, line 357

Class

GridStackEnginePluginBase
Provides base class for all gridstack layout engines.

Namespace

Drupal\gridstack

Code

protected function modifyItem($delta, array &$settings, array &$content, array &$attributes, array &$content_attributes, array $regions = []) {
  $settings['contentless'] = $this->stylizer
    ->getStyle('contentless', $settings);
  $this
    ->itemAttributes($attributes, $settings);
  $this
    ->itemContentAttributes($content_attributes, $settings);

  // Provides nested items if so configured.
  if ($this
    ->getSetting('use_nested')) {
    $this
      ->modifyNestedItem($delta, $settings, $content, $attributes, $content_attributes, $regions);
  }

  // Allows stylizer to modify contents and attributes.
  if ($this
    ->getSetting('_stylizer')) {
    $this->stylizer
      ->modifyItem($delta, $settings, $content, $attributes, $content_attributes, $regions);
  }
}