Skip to content
Snippets Groups Projects
Commit dd06e6df authored by Alex Pott's avatar Alex Pott
Browse files

Issue #2626476 by benjy: MigrationBuilder should have an interface

parent 1aa1fbe2
No related branches found
No related tags found
2 merge requests!7452Issue #1797438. HTML5 validation is preventing form submit and not fully...,!789Issue #3210310: Adjust Database API to remove deprecated Drupal 9 code in Drupal 10
......@@ -13,7 +13,7 @@
/**
* Builds migration entities from migration templates.
*/
class MigrationBuilder {
class MigrationBuilder implements MigrationBuilderInterface {
/**
* The builder plugin manager.
......@@ -33,14 +33,7 @@ public function __construct(MigratePluginManager $builder_manager) {
}
/**
* Builds migration entities from templates.
*
* @param array $templates
* The parsed templates (each of which is an array parsed from YAML), keyed
* by ID.
*
* @return \Drupal\migrate\Entity\MigrationInterface[]
* The migration entities derived from the templates.
* {@inheritdoc}
*/
public function createMigrations(array $templates) {
/** @var \Drupal\migrate\Entity\MigrationInterface[] $migrations */
......
<?php
/**
* @file
* Contains \Drupal\migrate\MigrationBuilderInterface.
*/
namespace Drupal\migrate;
/**
* The migration builder interface.
*/
interface MigrationBuilderInterface {
/**
* Builds migration entities from templates.
*
* @param array $templates
* The parsed templates (each of which is an array parsed from YAML), keyed
* by ID.
*
* @return \Drupal\migrate\Entity\MigrationInterface[]
* The migration entities derived from the templates.
*/
public function createMigrations(array $templates);
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment