Drupal investigation

MigrateExecutableInterface.php 1.4KB

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