You are here

protected function MigrateSourceMultiItems::hash in Migrate 7.2

Overrides MigrateSource::hash().

Overrides MigrateSource::hash

File

plugins/sources/multiitems.inc, line 203
Support for migration from sources where data spans multiple lines (ex. xml, json) and IDs for the items are part of each item and multiple items reside in a single file.

Class

MigrateSourceMultiItems
Implementation of MigrateSource, providing the semantics of iterating over IDs provided by a MigrateItems and retrieving data from a MigrateItems.

Code

protected function hash($row) {

  // Let the item class override the default hash function.
  if (method_exists($this->itemsClass, 'hash')) {
    $hash = $this->itemsClass
      ->hash($row);
  }
  else {
    $hash = parent::hash($row);
  }
  return $hash;
}