comparison modules/contrib/migrate_plus/src/DataParserPluginManager.php @ 0:c75dbcec494b

Initial commit from drush-created site
author Chris Cannam
date Thu, 05 Jul 2018 14:24:15 +0000
parents
children a9cd425dd02b
comparison
equal deleted inserted replaced
-1:000000000000 0:c75dbcec494b
1 <?php
2
3 namespace Drupal\migrate_plus;
4
5 use Drupal\Core\Cache\CacheBackendInterface;
6 use Drupal\Core\Extension\ModuleHandlerInterface;
7 use Drupal\Core\Plugin\DefaultPluginManager;
8
9 /**
10 * Provides a plugin manager for data parsers.
11 *
12 * @see \Drupal\migrate_plus\Annotation\DataParser
13 * @see \Drupal\migrate_plus\DataParserPluginBase
14 * @see \Drupal\migrate_plus\DataParserPluginInterface
15 * @see plugin_api
16 */
17 class DataParserPluginManager extends DefaultPluginManager {
18
19 /**
20 * Constructs a new DataParserPluginManager.
21 *
22 * @param \Traversable $namespaces
23 * An object that implements \Traversable which contains the root paths
24 * keyed by the corresponding namespace to look for plugin implementations,
25 * @param \Drupal\Core\Cache\CacheBackendInterface $cache_backend
26 * Cache backend instance to use.
27 * @param \Drupal\Core\Extension\ModuleHandlerInterface $module_handler
28 * The module handler to invoke the alter hook with.
29 */
30 public function __construct(\Traversable $namespaces, CacheBackendInterface $cache_backend, ModuleHandlerInterface $module_handler) {
31 parent::__construct('Plugin/migrate_plus/data_parser', $namespaces, $module_handler, 'Drupal\migrate_plus\DataParserPluginInterface', 'Drupal\migrate_plus\Annotation\DataParser');
32
33 $this->alterInfo('data_parser_info');
34 $this->setCacheBackend($cache_backend, 'migrate_plus_plugins_data_parser');
35 }
36
37 }