You are here

public function BootstrapLayoutsUpdateManager::getUpdates in Bootstrap Layouts 8.5

Same name and namespace in other branches
  1. 8.4 src/BootstrapLayoutsUpdateManager.php \Drupal\bootstrap_layouts\BootstrapLayoutsUpdateManager::getUpdates()

Retrieves the update plugins for a specific schema version.

Parameters

int $schema: The update schema version to retrieve.

Return value

\Drupal\bootstrap_layouts\Plugin\BootstrapLayouts\BootstrapLayoutsUpdateInterface[] An array of update plugins, keyed by their plugin id.

File

src/BootstrapLayoutsUpdateManager.php, line 42

Class

BootstrapLayoutsUpdateManager

Namespace

Drupal\bootstrap_layouts

Code

public function getUpdates($schema) {
  $updates = [];
  foreach ($this
    ->getDefinitions() as $plugin_id => $definition) {
    if (isset($definition['schema']) && $definition['schema'] == $schema) {
      $updates[$plugin_id] = $this
        ->createInstance($plugin_id);
    }
  }
  return $updates;
}