comparison core/modules/migrate/src/Plugin/MigrationPluginManagerInterface.php @ 0:4c8ae668cc8c

Initial import (non-working)
author Chris Cannam
date Wed, 29 Nov 2017 16:09:58 +0000
parents
children 1fec387a4317
comparison
equal deleted inserted replaced
-1:000000000000 0:4c8ae668cc8c
1 <?php
2
3 namespace Drupal\migrate\Plugin;
4
5 use Drupal\Component\Plugin\PluginManagerInterface;
6
7 /**
8 * Migration plugin manager interface.
9 */
10 interface MigrationPluginManagerInterface extends PluginManagerInterface {
11
12 /**
13 * Create pre-configured instance of plugin derivatives.
14 *
15 * @param array $id
16 * Either the plugin ID or the base plugin ID of the plugins being
17 * instantiated. Also accepts an array of plugin IDs and an empty array to
18 * load all plugins.
19 * @param array $configuration
20 * An array of configuration relevant to the plugin instances. Keyed by the
21 * plugin ID.
22 *
23 * @return \Drupal\migrate\Plugin\MigrationInterface[]
24 * Fully configured plugin instances.
25 *
26 * @throws \Drupal\Component\Plugin\Exception\PluginException
27 * If an instance cannot be created, such as if the ID is invalid.
28 */
29 public function createInstances($id, array $configuration = []);
30
31 /**
32 * Creates a stub migration plugin from a definition array.
33 *
34 * @param array $definition
35 * The migration definition. If an 'id' key is set then this will be used as
36 * the migration ID, if not a random ID will be assigned.
37 *
38 * @return \Drupal\migrate\Plugin\Migration
39 * The stub migration.
40 */
41 public function createStubMigration(array $definition);
42
43 }