You are here

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

Call all plugins which support the given operation.

If an operand is used it is passed to each operator and should be returned by each one. Not all operations require an operand in which case this will be NULL.

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.

mixed $operand: If there in an object being operated on (eg. a backup file) it will be passed to each plugin in succession. If not then this will be NULL.

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

Return value

mixed

Overrides PluginManagerInterface::call

File

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

Class

PluginManager
@package Drupal\backup_migrate\Core\Plugin

Namespace

Drupal\backup_migrate\Core\Plugin

Code

public function call($op, $operand = NULL, array $params = []) {

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