You are here

protected function GridStackEnginePluginBase::contentAttributes in GridStack 8.2

Provides the .gridstack__inner container attributes.

@todo this is not implemented, yet, only advanced usages with ungridding. The idea is to destroy all grids, and still take advantage of GridStack advanced and flexible stylings such as at Layout Builder pages. One sample valid usage is a parallax page which doesn't need grids, but needs styling. Since this introduces complications and requires custom theming, no UI is provided for now. Anyone who knows theming should be easily adding _ungrid via a hook_alter, and theme away as needed.

1 call to GridStackEnginePluginBase::contentAttributes()
GridStackEnginePluginBase::prepare in src/GridStackEnginePluginBase.php
Prepares the settings, selector and active styles.

File

src/GridStackEnginePluginBase.php, line 514

Class

GridStackEnginePluginBase
Provides base class for all gridstack layout engines.

Namespace

Drupal\gridstack

Code

protected function contentAttributes(array &$attributes, array &$settings) {
  if (!empty($settings['_ungrid']) && $settings['_level'] == GridStackDefault::LEVEL_ROOT) {

    // @todo $attributes['class'] = $this->containerClasses();
    $attributes['class'][] = 'gridstack__inner';
  }
}