You are here

public function PluginManager::getAllByOp in Backup and Migrate 8.4

Get all plugins that implement the given operation.

Parameters

string $op The name of the operation.:

Return value

\BackupMigrate\Core\Plugin\PluginInterface[]

Overrides PluginManagerInterface::getAllByOp

2 calls to PluginManager::getAllByOp()
PluginManager::call in lib/backup_migrate_core/src/Plugin/PluginManager.php
Call all plugins which support the given operation.
PluginManager::map in lib/backup_migrate_core/src/Plugin/PluginManager.php
Call all plugins which support the given operation. Return the results in an array keyed by the plugin id.

File

lib/backup_migrate_core/src/Plugin/PluginManager.php, line 95

Class

PluginManager
Class PluginManager.

Namespace

BackupMigrate\Core\Plugin

Code

public function getAllByOp($op) {
  $out = [];
  $weights = [];
  foreach ($this
    ->getAll() as $key => $plugin) {
    if ($plugin
      ->supportsOp($op)) {
      $out[$key] = $plugin;
      $weights[$key] = $plugin
        ->opWeight($op);
    }
  }
  array_multisort($weights, $out);
  return $out;
}