protected function Migration::onEmptyDestination in Migrate 7.2
React when migration didn't failed but destination ids are empty.
Parameters
object $data_row: Data.
array $ids: Destination ids.
1 call to Migration::onEmptyDestination()
- Migration::import in includes/
migration.inc - Perform an import operation - migrate items from source to destination.
File
- includes/
migration.inc, line 834 - Defines the base class for import/rollback processes.
Class
- Migration
- The base class for all import objects. This is where most of the smarts of the migrate module resides. Migrations are created by deriving from this class, and in the constructor (after calling parent::__construct()) initializing at a minimum the name,…
Code
protected function onEmptyDestination($data_row, $ids) {
$this->map
->saveIDMapping($this->sourceValues, array(), MigrateMap::STATUS_FAILED, $this->rollbackAction, NULL);
if ($this->map
->messageCount() == 0) {
$message = t('New object was not saved, no error provided');
$this
->saveMessage($message);
self::displayMessage($message);
}
}