You are here

protected function GridStackBase::buildDummyItem in GridStack 8.2

Returns the dummy box to measure cell height to fix aspect ratio.

1 call to GridStackBase::buildDummyItem()
GridStackBase::build in src/Plugin/gridstack/engine/GridStackBase.php
Alters GridStack build.

File

src/Plugin/gridstack/engine/GridStackBase.php, line 48

Class

GridStackBase
Provides the base class for two-dimensional layout engines.

Namespace

Drupal\gridstack\Plugin\gridstack\engine

Code

protected function buildDummyItem() {
  $item['attributes']['class'][] = 'gridstack__sizer is-nixbox';
  $item['attributes']['data-gs-height'] = 1;
  $item['attributes']['data-gs-width'] = 1;
  $settings['use_inner'] = $settings['_dummy'] = TRUE;
  return $this
    ->buildItem(100, $settings, $item);
}