public function KeyCommands::providerList in Key 8
Display a list of available key providers.
@command key:provider-list @option storage-method An optional key provider storage method on which to filter. @aliases key-provider-list @format table
File
- src/
Commands/ KeyCommands.php, line 317
Class
- KeyCommands
- Class KeyCommands.
Namespace
Drupal\key\CommandsCode
public function providerList($options = [
'storage-method' => NULL,
]) {
$result = [];
$storage_method = $options['storage-method'];
$plugins = $this->keyProviderPluginManager
->getDefinitions();
foreach ($plugins as $id => $plugin) {
if (!isset($storage_method) || $plugin['storage_method'] == $storage_method) {
$row = [];
$row['id'] = $id;
$row['description'] = $plugin['description'];
$result[$id] = $row;
}
}
return new RowsOfFields($result);
}