MigrateSkipRowException.php 990 B

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. <?php
  2. namespace Drupal\migrate;
  3. /**
  4. * This exception is thrown when a row should be skipped.
  5. */
  6. class MigrateSkipRowException extends \Exception {
  7. /**
  8. * Whether to record the skip in the map table, or skip silently.
  9. *
  10. * @var bool
  11. * TRUE to record as STATUS_IGNORED in the map, FALSE to skip silently.
  12. */
  13. protected $saveToMap;
  14. /**
  15. * Constructs a MigrateSkipRowException object.
  16. *
  17. * @param string $message
  18. * The message for the exception.
  19. * @param bool $save_to_map
  20. * TRUE to record as STATUS_IGNORED in the map, FALSE to skip silently.
  21. */
  22. public function __construct($message = NULL, $save_to_map = TRUE) {
  23. parent::__construct($message);
  24. $this->saveToMap = $save_to_map;
  25. }
  26. /**
  27. * Whether the thrower wants to record this skip in the map table.
  28. *
  29. * @return bool
  30. * TRUE to record as STATUS_IGNORED in the map, FALSE to skip silently.
  31. */
  32. public function getSaveToMap() {
  33. return $this->saveToMap;
  34. }
  35. }