You are here

public function GridStackHook::configSchemaInfoAlter in GridStack 8.2

Implements hook_config_schema_info_alter().

@todo: Also verify widget.module, and revisit if any further change. @todo replace with BlazyAlter::configSchemaInfoAlter() post blazy:8.x-2.0.

File

src/GridStackHook.php, line 47

Class

GridStackHook
Provides GridStack utility methods for Drupal hooks.

Namespace

Drupal\gridstack

Code

public function configSchemaInfoAlter(array &$definitions) {
  if (isset($definitions['layout_plugin.settings'])) {
    $this
      ->mapConfigSchemaInfoAlter($definitions['layout_plugin.settings']);
  }

  // @todo: Remove when DS passes layout.settings to layout_plugin.settings.
  if (isset($definitions['core.entity_view_display.*.*.*.third_party.ds'])) {
    $this
      ->mapConfigSchemaInfoAlter($definitions['core.entity_view_display.*.*.*.third_party.ds']['mapping']['layout']['mapping']['settings']);
  }
  foreach ([
    'gridstack_base',
    'gridstack_vanilla',
  ] as $key) {
    if (isset($definitions[$key])) {
      Blazy::configSchemaInfoAlter($definitions, $key, GridStackDefault::extendedSettings());
    }
  }
}