|
@@ -269,6 +269,41 @@ class D7NodeTheme extends FieldableEntity {
|
|
|
$row->setSourceProperty('field_equipes', $equipes_paragraphes);
|
|
|
}
|
|
|
|
|
|
+ $partenaires_paragraphes = array();
|
|
|
+ if ($logo_partenaires = $row->getSourceProperty('field_popsu_themeur_partenaires')){
|
|
|
+ foreach ($logo_partenaires as $value) {
|
|
|
+ $fid = $value['fid'] ;
|
|
|
+ // manual migration_lookup for new fid
|
|
|
+ $database = \Drupal::database();
|
|
|
+ $fidquery = $database->select('migrate_map_d7_allpublicfiles', 'm')
|
|
|
+ ->condition('m.sourceid1', $fid)
|
|
|
+ ->fields('m', ['sourceid1', 'destid1']);
|
|
|
+ $result = $fidquery->execute();
|
|
|
+ foreach ($result as $record) {
|
|
|
+ if($record){
|
|
|
+ $target_id = $record->destid1;
|
|
|
+ break;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ if ($target_id) {
|
|
|
+ $value['target_id'] = $target_id;
|
|
|
+ unset($value['fid']);
|
|
|
+ $p = Paragraph::create(['type' => 'partenaires']);
|
|
|
+ $p->set('field_logo_partenaire', $value)
|
|
|
+ ->isNew();
|
|
|
+ $p->save();
|
|
|
+
|
|
|
+ $partenaires_paragraphes[] = array(
|
|
|
+ 'target_id' => $p->id(),
|
|
|
+ 'target_revision_id' => $p->getRevisionId(),
|
|
|
+ );
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ if (!empty($partenaires_paragraphes)) {
|
|
|
+ $row->setSourceProperty('field_partenaires', $partenaires_paragraphes);
|
|
|
+ }
|
|
|
+
|
|
|
// record migration errors in field_memo
|
|
|
if(isset($memo)){
|
|
|
$field_memo = array(
|