You are here

function _bootstrap_layouts_update in Bootstrap Layouts 8.5

Same name and namespace in other branches
  1. 8.4 bootstrap_layouts.install \_bootstrap_layouts_update()

Runs updates for registered update plugins.

Parameters

int $schema: The schema version to update.

Throws

Exception When the "plugin.manager.bootstrap_layouts" service could not be loaded.

See also

\Drupal\bootstrap_layouts\BootstrapLayoutsManager::update()

2 calls to _bootstrap_layouts_update()
bootstrap_layouts_update_8401 in ./bootstrap_layouts.install
Upgrade existing Bootstrap Layout instances.
bootstrap_layouts_update_8402 in ./bootstrap_layouts.install
Fix "1 Column (stacked)" regions.

File

./bootstrap_layouts.install, line 49
Install, uninstall and update hooks for the Bootstrap Layouts module.

Code

function _bootstrap_layouts_update($schema) {

  // Ensure dependencies.
  _bootstrap_layouts_ensure_dependency();

  /** @var \Drupal\bootstrap_layouts\BootstrapLayoutsManager $bootstrap_layouts_manager */
  if ($manager = \Drupal::service('plugin.manager.bootstrap_layouts')) {
    $manager
      ->update($schema);
  }
  else {
    throw new Exception('Unable to load the "plugin.manager.bootstrap_layouts" service.');
  }
}