You are here

public static function FeedsPlugin::all in Feeds 8.2

Get all available plugins.

5 calls to FeedsPlugin::all()
FeedsPlugin::byType in lib/Drupal/feeds/Plugin/FeedsPlugin.php
Gets all available plugins of a particular type.
FeedsPlugin::child in lib/Drupal/feeds/Plugin/FeedsPlugin.php
Determines whether given plugin is derived from given base plugin.
feeds_forms in ./feeds.module
Implements hook_forms().
feeds_plugin in ./feeds.module
Gets an instance of a class for a given plugin and id.
feeds_ui_edit_page in feeds_ui/feeds_ui.admin.inc
Edit feed configuration.

File

lib/Drupal/feeds/Plugin/FeedsPlugin.php, line 122
Definition of FeedsPlugin class.

Class

FeedsPlugin
Implement source interface for all plugins.

Namespace

Drupal\feeds\Plugin

Code

public static function all() {
  $fetchers = \Drupal::service('plugin.manager.feeds.fetcher')
    ->getDefinitions();
  $parsers = \Drupal::service('plugin.manager.feeds.parser')
    ->getDefinitions();
  $processors = \Drupal::service('plugin.manager.feeds.processor')
    ->getDefinitions();
  $result = array();
  foreach ($fetchers as $key => $info) {
    if (!empty($info['hidden'])) {
      continue;
    }
    $result[$key] = $info;
  }
  foreach ($parsers as $key => $info) {
    if (!empty($info['hidden'])) {
      continue;
    }
    $result[$key] = $info;
  }
  foreach ($processors as $key => $info) {
    if (!empty($info['hidden'])) {
      continue;
    }
    $result[$key] = $info;
  }

  // Sort plugins by name and return.
  // uasort($result, 'feeds_plugin_compare');
  return $result;
}