5 * Install, uninstall and update hooks for the Bootstrap Layouts module.
9 * Runs updates for registered update plugins.
12 * The schema version to update.
14 * @see \Drupal\bootstrap_layouts\BootstrapLayoutsManager::update()
17 * When the "plugin.manager.bootstrap_layouts" service could not be loaded.
19 function _bootstrap_layouts_update($schema) {
20 $container = \Drupal::getContainer();
22 // Rebuild the container if the bootstrap layouts manager doesn't exist.
23 if (!$container->has('plugin.manager.bootstrap_layouts')) {
24 drupal_flush_all_caches();
27 /** @var \Drupal\bootstrap_layouts\BootstrapLayoutsManager $bootstrap_layouts_manager */
28 if ($manager = $container->get('plugin.manager.bootstrap_layouts')) {
29 $manager->update($schema);
32 throw new Exception('Unable to load the "plugin.manager.bootstrap_layouts" service.');
37 * Upgrade existing Bootstrap Layout instances.
39 function bootstrap_layouts_update_8401() {
40 /** @see \Drupal\bootstrap_layouts\Plugin\BootstrapLayouts\Updates\BootstrapLayoutsUpdate8401 */
41 _bootstrap_layouts_update(8401);
45 * Fix "1 Column (stacked)" regions.
47 function bootstrap_layouts_update_8402() {
48 /** @see \Drupal\bootstrap_layouts\Plugin\BootstrapLayouts\Updates\BootstrapLayoutsUpdate8402 */
49 _bootstrap_layouts_update(8402);