annotate modules/contrib/migrate_plus/src/DataFetcherPluginManager.php @ 4:a9cd425dd02b

Update, including to Drupal core 8.6.10
author Chris Cannam
date Thu, 28 Feb 2019 13:11:55 +0000
parents c75dbcec494b
children
rev   line source
Chris@0 1 <?php
Chris@0 2
Chris@0 3 namespace Drupal\migrate_plus;
Chris@0 4
Chris@0 5 use Drupal\Core\Cache\CacheBackendInterface;
Chris@0 6 use Drupal\Core\Extension\ModuleHandlerInterface;
Chris@0 7 use Drupal\Core\Plugin\DefaultPluginManager;
Chris@0 8
Chris@0 9 /**
Chris@0 10 * Provides a plugin manager for data fetchers.
Chris@0 11 *
Chris@0 12 * @see \Drupal\migrate_plus\Annotation\DataFetcher
Chris@0 13 * @see \Drupal\migrate_plus\DataFetcherPluginBase
Chris@0 14 * @see \Drupal\migrate_plus\DataFetcherPluginInterface
Chris@0 15 * @see plugin_api
Chris@0 16 */
Chris@0 17 class DataFetcherPluginManager extends DefaultPluginManager {
Chris@0 18
Chris@0 19 /**
Chris@0 20 * Constructs a new DataFetcherPluginManager.
Chris@0 21 *
Chris@0 22 * @param \Traversable $namespaces
Chris@0 23 * An object that implements \Traversable which contains the root paths
Chris@4 24 * keyed by the corresponding namespace to look for plugin implementations.
Chris@0 25 * @param \Drupal\Core\Cache\CacheBackendInterface $cache_backend
Chris@0 26 * Cache backend instance to use.
Chris@0 27 * @param \Drupal\Core\Extension\ModuleHandlerInterface $module_handler
Chris@0 28 * The module handler to invoke the alter hook with.
Chris@0 29 */
Chris@0 30 public function __construct(\Traversable $namespaces, CacheBackendInterface $cache_backend, ModuleHandlerInterface $module_handler) {
Chris@0 31 parent::__construct('Plugin/migrate_plus/data_fetcher', $namespaces, $module_handler, 'Drupal\migrate_plus\DataFetcherPluginInterface', 'Drupal\migrate_plus\Annotation\DataFetcher');
Chris@0 32
Chris@0 33 $this->alterInfo('data_fetcher_info');
Chris@0 34 $this->setCacheBackend($cache_backend, 'migrate_plus_plugins_data_fetcher');
Chris@0 35 }
Chris@0 36
Chris@0 37 }