You are here

public function PluginManager::map in Backup and Migrate 5.0.x

Call all plugins which support the given operation.

Params is an array of extra params which may be used. Plugins should expect these to be passed as a keyed array.

Parameters

string $op: The name of the operation to be called.

array $params: Optional operation parameters as a key/value array.

Return value

array The results in an array keyed by the plugin id.

Overrides PluginManagerInterface::map

File

src/Core/Plugin/PluginManager.php, line 125

Class

PluginManager
@package Drupal\backup_migrate\Core\Plugin

Namespace

Drupal\backup_migrate\Core\Plugin

Code

public function map($op, array $params = []) {
  $out = [];

  // Run each of the installed plugins which implements the given operation.
  foreach ($this
    ->getAllByOp($op) as $key => $plugin) {
    $out[$key] = $plugin
      ->{$op}($params);
  }
  return $out;
}