annotate core/modules/migrate/src/Plugin/MigrationPluginManagerInterface.php @ 5:12f9dff5fda9 tip

Update to Drupal core 8.7.1
author Chris Cannam
date Thu, 09 May 2019 15:34:47 +0100
parents c75dbcec494b
children
rev   line source
Chris@0 1 <?php
Chris@0 2
Chris@0 3 namespace Drupal\migrate\Plugin;
Chris@0 4
Chris@0 5 use Drupal\Component\Plugin\PluginManagerInterface;
Chris@0 6
Chris@0 7 /**
Chris@0 8 * Migration plugin manager interface.
Chris@0 9 */
Chris@0 10 interface MigrationPluginManagerInterface extends PluginManagerInterface {
Chris@0 11
Chris@0 12 /**
Chris@0 13 * Create pre-configured instance of plugin derivatives.
Chris@0 14 *
Chris@0 15 * @param array $id
Chris@0 16 * Either the plugin ID or the base plugin ID of the plugins being
Chris@0 17 * instantiated. Also accepts an array of plugin IDs and an empty array to
Chris@0 18 * load all plugins.
Chris@0 19 * @param array $configuration
Chris@0 20 * An array of configuration relevant to the plugin instances. Keyed by the
Chris@0 21 * plugin ID.
Chris@0 22 *
Chris@0 23 * @return \Drupal\migrate\Plugin\MigrationInterface[]
Chris@0 24 * Fully configured plugin instances.
Chris@0 25 *
Chris@0 26 * @throws \Drupal\Component\Plugin\Exception\PluginException
Chris@0 27 * If an instance cannot be created, such as if the ID is invalid.
Chris@0 28 */
Chris@0 29 public function createInstances($id, array $configuration = []);
Chris@0 30
Chris@0 31 /**
Chris@0 32 * Creates a stub migration plugin from a definition array.
Chris@0 33 *
Chris@0 34 * @param array $definition
Chris@0 35 * The migration definition. If an 'id' key is set then this will be used as
Chris@0 36 * the migration ID, if not a random ID will be assigned.
Chris@0 37 *
Chris@0 38 * @return \Drupal\migrate\Plugin\Migration
Chris@0 39 * The stub migration.
Chris@0 40 */
Chris@0 41 public function createStubMigration(array $definition);
Chris@0 42
Chris@0 43 /**
Chris@0 44 * Create migrations given a tag.
Chris@0 45 *
Chris@0 46 * @param string $tag
Chris@0 47 * A migration tag we want to filter by.
Chris@0 48 *
Chris@0 49 * @return array|\Drupal\migrate\Plugin\MigrationInterface[]
Chris@0 50 * An array of migration objects with the given tag.
Chris@0 51 */
Chris@0 52 public function createInstancesByTag($tag);
Chris@0 53
Chris@0 54 }