You are here

public function XmlRpc::listPlugins in Production check & Production monitor 8

Fetches all plugins in a format prod monitor can deal with.

File

modules/prod_check_xmlrpc/src/Plugin/ProdCheckProcessor/XmlRpc.php, line 22

Class

XmlRpc
XML-RPC processor

Namespace

Drupal\prod_check_xmlrpc\Plugin\ProdCheckProcessor

Code

public function listPlugins() {
  $categories = $this->categoryManager
    ->getDefinitions();
  $checks = $this->checkManager
    ->getDefinitions();
  $plugins = [];
  foreach ($checks as $plugin_id => $check) {
    if (isset($categories[$check['category']])) {
      $plugins[(string) $check['category']]['functions'][$plugin_id] = (string) $check['title'];
    }
  }
  return $plugins;
}