You are here

public function GridBase::containerAttributes in GridStack 8.2

Returns the .gridstack container attributes.

Overrides GridStackEnginePluginBase::containerAttributes

File

src/Plugin/gridstack/engine/GridBase.php, line 36

Class

GridBase
Provides the base class for one-dimensional layout engines.

Namespace

Drupal\gridstack\Plugin\gridstack\engine

Code

public function containerAttributes(array &$attributes, array &$settings) {
  parent::containerAttributes($attributes, $settings);

  // Provides vertical margin generic gridstackless classes.
  if ($vm = $this
    ->getSetting('vm')) {
    $attributes['class'][] = 'is-vm vm-' . $vm;
    unset($settings['vm']);
  }
}