Chris@0
|
1 <?php
|
Chris@0
|
2
|
Chris@0
|
3 namespace Drupal\migrate;
|
Chris@0
|
4
|
Chris@0
|
5 use Drupal\migrate\Plugin\MigrationInterface;
|
Chris@0
|
6
|
Chris@0
|
7 interface MigrateExecutableInterface {
|
Chris@0
|
8
|
Chris@0
|
9 /**
|
Chris@0
|
10 * Performs an import operation - migrate items from source to destination.
|
Chris@0
|
11 */
|
Chris@0
|
12 public function import();
|
Chris@0
|
13
|
Chris@0
|
14 /**
|
Chris@0
|
15 * Performs a rollback operation - remove previously-imported items.
|
Chris@0
|
16 */
|
Chris@0
|
17 public function rollback();
|
Chris@0
|
18
|
Chris@0
|
19 /**
|
Chris@0
|
20 * Processes a row.
|
Chris@0
|
21 *
|
Chris@0
|
22 * @param \Drupal\migrate\Row $row
|
Chris@0
|
23 * The $row to be processed.
|
Chris@0
|
24 * @param array $process
|
Chris@0
|
25 * (optional) A process pipeline configuration. If not set, the top level
|
Chris@0
|
26 * process configuration in the migration entity is used.
|
Chris@0
|
27 * @param mixed $value
|
Chris@0
|
28 * (optional) Initial value of the pipeline for the first destination.
|
Chris@0
|
29 * Usually setting this is not necessary as $process typically starts with
|
Chris@0
|
30 * a 'get'. This is useful only when the $process contains a single
|
Chris@0
|
31 * destination and needs to access a value outside of the source. See
|
Chris@16
|
32 * \Drupal\migrate\Plugin\migrate\process\SubProcess::transformKey for an
|
Chris@0
|
33 * example.
|
Chris@0
|
34 *
|
Chris@0
|
35 * @throws \Drupal\migrate\MigrateException
|
Chris@0
|
36 */
|
Chris@0
|
37 public function processRow(Row $row, array $process = NULL, $value = NULL);
|
Chris@0
|
38
|
Chris@0
|
39 /**
|
Chris@0
|
40 * Passes messages through to the map class.
|
Chris@0
|
41 *
|
Chris@0
|
42 * @param string $message
|
Chris@0
|
43 * The message to record.
|
Chris@0
|
44 * @param int $level
|
Chris@0
|
45 * (optional) Message severity (defaults to MESSAGE_ERROR).
|
Chris@0
|
46 */
|
Chris@0
|
47 public function saveMessage($message, $level = MigrationInterface::MESSAGE_ERROR);
|
Chris@0
|
48
|
Chris@0
|
49 }
|