class AggregatorPluginManager

Manages aggregator plugins.

Hierarchy

Expanded class hierarchy of AggregatorPluginManager

See also

\Drupal\aggregator\Annotation\AggregatorParser

\Drupal\aggregator\Annotation\AggregatorFetcher

\Drupal\aggregator\Annotation\AggregatorProcessor

\Drupal\aggregator\Plugin\AggregatorPluginSettingsBase

\Drupal\aggregator\Plugin\FetcherInterface

\Drupal\aggregator\Plugin\ProcessorInterface

\Drupal\aggregator\Plugin\ParserInterface

Plugin API

2 files declare their use of AggregatorPluginManager
ItemsImporter.php in core/modules/aggregator/src/ItemsImporter.php
SettingsForm.php in core/modules/aggregator/src/Form/SettingsForm.php
1 string reference to 'AggregatorPluginManager'
aggregator.services.yml in core/modules/aggregator/aggregator.services.yml
core/modules/aggregator/aggregator.services.yml
3 services use AggregatorPluginManager
plugin.manager.aggregator.fetcher in core/modules/aggregator/aggregator.services.yml
Drupal\aggregator\Plugin\AggregatorPluginManager
plugin.manager.aggregator.parser in core/modules/aggregator/aggregator.services.yml
Drupal\aggregator\Plugin\AggregatorPluginManager
plugin.manager.aggregator.processor in core/modules/aggregator/aggregator.services.yml
Drupal\aggregator\Plugin\AggregatorPluginManager

File

core/modules/aggregator/src/Plugin/AggregatorPluginManager.php, line 21

Namespace

Drupal\aggregator\Plugin
View source
class AggregatorPluginManager extends DefaultPluginManager {
  
  /**
   * Constructs an AggregatorPluginManager object.
   *
   * @param string $type
   *   The plugin type, for example fetcher.
   * @param \Traversable $namespaces
   *   An object that implements \Traversable which contains the root paths
   *   keyed by the corresponding namespace to look for plugin implementations.
   * @param \Drupal\Core\Cache\CacheBackendInterface $cache_backend
   *   Cache backend instance to use.
   * @param \Drupal\Core\Extension\ModuleHandlerInterface $module_handler
   *   The module handler.
   */
  public function __construct($type, \Traversable $namespaces, CacheBackendInterface $cache_backend, ModuleHandlerInterface $module_handler) {
    $type_annotations = [
      'fetcher' => 'Drupal\\aggregator\\Annotation\\AggregatorFetcher',
      'parser' => 'Drupal\\aggregator\\Annotation\\AggregatorParser',
      'processor' => 'Drupal\\aggregator\\Annotation\\AggregatorProcessor',
    ];
    $plugin_interfaces = [
      'fetcher' => 'Drupal\\aggregator\\Plugin\\FetcherInterface',
      'parser' => 'Drupal\\aggregator\\Plugin\\ParserInterface',
      'processor' => 'Drupal\\aggregator\\Plugin\\ProcessorInterface',
    ];
    parent::__construct("Plugin/aggregator/{$type}", $namespaces, $module_handler, $plugin_interfaces[$type], $type_annotations[$type]);
    $this->alterInfo('aggregator_' . $type . '_info');
    $this->setCacheBackend($cache_backend, 'aggregator_' . $type . '_plugins');
  }

}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.