sourceIdFields example


  public function getSourceIdsHash(array $source_id_values) {
    // When looking up the destination ID we require an array with both the     // source key and value, e.g. ['nid' => 41]. In this case, $source_id_values     // need to be ordered the same order as $this->sourceIdFields().     // However, the Migration process plugin doesn't currently have a way to get     // the source key so we presume the values have been passed through in the     // correct order.     if (!isset($source_id_values[0])) {
      $source_id_values_keyed = [];
      foreach ($this->sourceIdFields() as $field_name => $source_id) {
        $source_id_values_keyed[] = $source_id_values[$field_name];
      }
      $source_id_values = $source_id_values_keyed;
    }
    return hash('sha256', serialize(array_map('strval', $source_id_values)));
  }

  /** * The source ID fields. * * @return array * The source ID fields. */
Home | Imprint | This part of the site doesn't use cookies.