You are here

public function MigratePluginManager::__construct in Drupal 8

Same name and namespace in other branches
  1. 9 core/modules/migrate/src/Plugin/MigratePluginManager.php \Drupal\migrate\Plugin\MigratePluginManager::__construct()
  2. 10 core/modules/migrate/src/Plugin/MigratePluginManager.php \Drupal\migrate\Plugin\MigratePluginManager::__construct()

Constructs a MigratePluginManager object.

Parameters

string $type: The type of the plugin: row, source, process, destination, entity_field, id_map.

\Traversable $namespaces: An object that implements \Traversable which contains the root paths keyed by the corresponding namespace to look for plugin implementations.

\Drupal\Core\Cache\CacheBackendInterface $cache_backend: Cache backend instance to use.

\Drupal\Core\Extension\ModuleHandlerInterface $module_handler: The module handler to invoke the alter hook with.

string $annotation: (optional) The annotation class name. Defaults to 'Drupal\Component\Annotation\PluginID'.

Overrides DefaultPluginManager::__construct

3 calls to MigratePluginManager::__construct()
MigrateDestinationPluginManager::__construct in core/modules/migrate/src/Plugin/MigrateDestinationPluginManager.php
Constructs a MigrateDestinationPluginManager object.
MigrateFieldPluginManagerTestClass::__construct in core/modules/migrate_drupal/tests/src/Unit/MigrateFieldPluginManagerTest.php
Constructs a MigratePluginManagerTestClass object.
MigrateSourcePluginManager::__construct in core/modules/migrate/src/Plugin/MigrateSourcePluginManager.php
MigrateSourcePluginManager constructor.
3 methods override MigratePluginManager::__construct()
MigrateDestinationPluginManager::__construct in core/modules/migrate/src/Plugin/MigrateDestinationPluginManager.php
Constructs a MigrateDestinationPluginManager object.
MigrateFieldPluginManagerTestClass::__construct in core/modules/migrate_drupal/tests/src/Unit/MigrateFieldPluginManagerTest.php
Constructs a MigratePluginManagerTestClass object.
MigrateSourcePluginManager::__construct in core/modules/migrate/src/Plugin/MigrateSourcePluginManager.php
MigrateSourcePluginManager constructor.

File

core/modules/migrate/src/Plugin/MigratePluginManager.php, line 43

Class

MigratePluginManager
Manages migrate plugins.

Namespace

Drupal\migrate\Plugin

Code

public function __construct($type, \Traversable $namespaces, CacheBackendInterface $cache_backend, ModuleHandlerInterface $module_handler, $annotation = 'Drupal\\Component\\Annotation\\PluginID') {
  parent::__construct("Plugin/migrate/{$type}", $namespaces, $module_handler, NULL, $annotation);
  $this
    ->alterInfo('migrate_' . $type . '_info');
  $this
    ->setCacheBackend($cache_backend, 'migrate_plugins_' . $type);
}