You are here

function gridstack_update_8206 in GridStack 8.2

Added GridStackEngineManager service to manage layout engines.

File

./gridstack.install, line 219
Installation actions for GridStack.

Code

function gridstack_update_8206() {
  $config = \Drupal::configFactory()
    ->getEditable('gridstack.settings');

  // Update framework to use strict plugin definition due to versions.
  if ($framework = $config
    ->get('framework')) {
    if ($framework == 'bootstrap') {
      $config
        ->set('framework', 'bootstrap4');
    }
    elseif ($framework == 'foundation') {
      $config
        ->set('framework', 'foundation5');
    }
    $config
      ->save(TRUE);
  }
}