|
@@ -87,6 +87,47 @@ class D7NodeProgramme extends D7Programme {
|
|
|
$row->setSourceProperty('text_paragraphe', $text_paragraphe);
|
|
|
|
|
|
// Sous partie
|
|
|
+ // looping through special_type
|
|
|
+ $sous_parties = array();
|
|
|
+ foreach (['colloques', 'publications'] as $special_type) {
|
|
|
+ $ps = array();
|
|
|
+ // looping through nodes
|
|
|
+ foreach ($associateds[$special_type] as $key => $special) {
|
|
|
+ // looping through fields
|
|
|
+ foreach (['field_popsu_special_body', 'field_popsu_special_text'] as $field) {
|
|
|
+ if (!empty($special[$field])) {
|
|
|
+ // creating the sous partie contents (sub paragraphes)
|
|
|
+ $text = $special[$field][0];
|
|
|
+ $text[0]['format'] = 'wysiwyg';
|
|
|
+ $p = Paragraph::create(['type' => 'sous_partie_programme_contents']);
|
|
|
+ $p->set('field_texte', $text)
|
|
|
+ ->set('field_titre', $special['title'])
|
|
|
+ // TODO ->set('field_liste_contenus',) migration_lookup on popsu_colloques -> evenements
|
|
|
+ ->isNew();
|
|
|
+ $p->save();
|
|
|
+ $ps[] = array(
|
|
|
+ 'target_id' => $p->id(),
|
|
|
+ 'target_revision_id' => $p->getRevisionId(),
|
|
|
+ );
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ if (!empty($ps)) {
|
|
|
+ // creating sous partie (paragraphe)
|
|
|
+ $p = Paragraph::create(['type' => 'sous_partie_programme']);
|
|
|
+ $p->set('field_sous_partie_contenus', $ps)
|
|
|
+ ->set('field_titre', $special_type)
|
|
|
+ ->isNew();
|
|
|
+ $p->save();
|
|
|
+ $sous_parties[] = array(
|
|
|
+ 'target_id' => $p->id(),
|
|
|
+ 'target_revision_id' => $p->getRevisionId(),
|
|
|
+ );
|
|
|
+ }
|
|
|
+ }
|
|
|
+ if (!empty($sous_parties)) {
|
|
|
+ $row->setSourceProperty('sous_parties', $sous_parties);
|
|
|
+ }
|
|
|
|
|
|
// fichiers
|
|
|
// files from current node
|