popsu_migrate: D7NodeRessource ok
This commit is contained in:
		@@ -1,4 +1,4 @@
 | 
			
		||||
uuid: 10b75e27-fd9a-41e6-96d2-6cda8f4e51c0
 | 
			
		||||
uuid: 071e279f-245e-4b84-9923-2af9f39fb8e9
 | 
			
		||||
langcode: fr
 | 
			
		||||
status: true
 | 
			
		||||
dependencies: {  }
 | 
			
		||||
 
 | 
			
		||||
@@ -1,4 +1,4 @@
 | 
			
		||||
uuid: e3cc92c5-b0ab-4080-af72-c85263400cd2
 | 
			
		||||
uuid: 01d9fb31-fab8-4cd4-8baa-952cc5abbac9
 | 
			
		||||
langcode: fr
 | 
			
		||||
status: true
 | 
			
		||||
dependencies: {  }
 | 
			
		||||
 
 | 
			
		||||
@@ -1,4 +1,4 @@
 | 
			
		||||
uuid: 21b27148-dd80-4f6d-89e3-0e2ac273fcaa
 | 
			
		||||
uuid: 2d9231da-03d9-4adc-8e76-5daef3f9aab3
 | 
			
		||||
langcode: fr
 | 
			
		||||
status: true
 | 
			
		||||
dependencies: {  }
 | 
			
		||||
 
 | 
			
		||||
@@ -1,9 +1,9 @@
 | 
			
		||||
uuid: c56ee3c4-8f8c-4db9-8d4e-3e561717a77a
 | 
			
		||||
uuid: 507f9a8c-7553-49f1-8ca0-0060a62b4a76
 | 
			
		||||
langcode: fr
 | 
			
		||||
status: true
 | 
			
		||||
dependencies: {  }
 | 
			
		||||
_core:
 | 
			
		||||
  default_config_hash: vLP1_Cnin9Yl02tpBgcYRMk7JrLOJRChR8FvtW1nrXo
 | 
			
		||||
  default_config_hash: vaJGqfIaPvzz6PaFSoSw7KbhDXnpq2BHStr--jVZeyY
 | 
			
		||||
id: d7_node_ressource
 | 
			
		||||
class: null
 | 
			
		||||
field_plugin_method: null
 | 
			
		||||
@@ -47,6 +47,61 @@ process:
 | 
			
		||||
    source: field_projet
 | 
			
		||||
    no_stub: true
 | 
			
		||||
  field_poid: field_poids
 | 
			
		||||
  field_type_de_ressource:
 | 
			
		||||
    plugin: migration_lookup
 | 
			
		||||
    migration: d7_taxonomy_term_type_doc
 | 
			
		||||
    source: field_popsu_doc_type
 | 
			
		||||
    no_stub: true
 | 
			
		||||
  field_sous_titre:
 | 
			
		||||
    plugin: sub_process
 | 
			
		||||
    source: field_popsu_publication_soustitr
 | 
			
		||||
    process:
 | 
			
		||||
      value: value
 | 
			
		||||
  field_edition:
 | 
			
		||||
    plugin: sub_process
 | 
			
		||||
    source: field_popsu_doc_source
 | 
			
		||||
    process:
 | 
			
		||||
      value: value
 | 
			
		||||
      summary: summary
 | 
			
		||||
      format:
 | 
			
		||||
        plugin: default_value
 | 
			
		||||
        default_value: wysiwyg
 | 
			
		||||
  body:
 | 
			
		||||
    plugin: sub_process
 | 
			
		||||
    source: body
 | 
			
		||||
    process:
 | 
			
		||||
      value: value
 | 
			
		||||
      summary: summary
 | 
			
		||||
      format:
 | 
			
		||||
        plugin: default_value
 | 
			
		||||
        default_value: wysiwyg
 | 
			
		||||
  field_image:
 | 
			
		||||
    plugin: sub_process
 | 
			
		||||
    source: field_popsu_publication_cover
 | 
			
		||||
    process:
 | 
			
		||||
      target_id:
 | 
			
		||||
        plugin: migration_lookup
 | 
			
		||||
        migration: d7_allpublicfiles
 | 
			
		||||
        source: fid
 | 
			
		||||
        no_stub: true
 | 
			
		||||
      alt: alt
 | 
			
		||||
      title: title
 | 
			
		||||
  field_fichier:
 | 
			
		||||
    plugin: sub_process
 | 
			
		||||
    source: field_popsu_doc_files
 | 
			
		||||
    process:
 | 
			
		||||
      target_id:
 | 
			
		||||
        plugin: migration_lookup
 | 
			
		||||
        migration: d7_allpublicfiles
 | 
			
		||||
        source: fid
 | 
			
		||||
        no_stub: true
 | 
			
		||||
      display: display
 | 
			
		||||
      description: description
 | 
			
		||||
  field_ressources_liees:
 | 
			
		||||
    plugin: migration_lookup
 | 
			
		||||
    migration: d7_node_ressource
 | 
			
		||||
    source: field_projet
 | 
			
		||||
    no_stub: true
 | 
			
		||||
  field_memo: field_memo
 | 
			
		||||
destination:
 | 
			
		||||
  plugin: 'entity:node'
 | 
			
		||||
 
 | 
			
		||||
@@ -1,4 +1,4 @@
 | 
			
		||||
uuid: cad96842-81a6-4933-bc39-8b5d8068e552
 | 
			
		||||
uuid: 025b0179-b925-43c1-8b0e-e7826b540622
 | 
			
		||||
langcode: fr
 | 
			
		||||
status: true
 | 
			
		||||
dependencies: {  }
 | 
			
		||||
 
 | 
			
		||||
@@ -1,4 +1,4 @@
 | 
			
		||||
uuid: 2cb0a4dd-17f3-4e91-b0c4-a7d30e2529eb
 | 
			
		||||
uuid: d5376a3b-4a58-4162-8d64-71b37e41e8b1
 | 
			
		||||
langcode: fr
 | 
			
		||||
status: true
 | 
			
		||||
dependencies: {  }
 | 
			
		||||
 
 | 
			
		||||
@@ -0,0 +1,43 @@
 | 
			
		||||
uuid: d72d270f-6032-4795-a0ea-cbec93e6e524
 | 
			
		||||
langcode: fr
 | 
			
		||||
status: true
 | 
			
		||||
dependencies: {  }
 | 
			
		||||
_core:
 | 
			
		||||
  default_config_hash: DR4n-aywyhGhgNbB33VfN1yxn9_ePqV0HV9vjt45Gdg
 | 
			
		||||
id: d7_taxonomy_term_type_doc
 | 
			
		||||
class: null
 | 
			
		||||
field_plugin_method: null
 | 
			
		||||
cck_plugin_method: null
 | 
			
		||||
migration_tags:
 | 
			
		||||
  - 'Drupal 7'
 | 
			
		||||
  - Content
 | 
			
		||||
  - Popsu
 | 
			
		||||
migration_group: popsu
 | 
			
		||||
label: 'Taxonomy terms Type de Document'
 | 
			
		||||
source:
 | 
			
		||||
  plugin: d7_taxoterm_typedoc
 | 
			
		||||
  bundle: popsu_documents_type
 | 
			
		||||
process:
 | 
			
		||||
  vid:
 | 
			
		||||
    plugin: default_value
 | 
			
		||||
    default_value: types_de_document
 | 
			
		||||
  name: name
 | 
			
		||||
  description/value: description
 | 
			
		||||
  description/format: format
 | 
			
		||||
  weight: weight
 | 
			
		||||
  parent_id:
 | 
			
		||||
    -
 | 
			
		||||
      plugin: skip_on_empty
 | 
			
		||||
      method: process
 | 
			
		||||
      source: parent
 | 
			
		||||
    -
 | 
			
		||||
      plugin: migration_lookup
 | 
			
		||||
      migration: d7_taxonomy_term_type_doc
 | 
			
		||||
  parent:
 | 
			
		||||
    plugin: default_value
 | 
			
		||||
    default_value: 0
 | 
			
		||||
    source: '@parent_id'
 | 
			
		||||
  changed: timestamp
 | 
			
		||||
destination:
 | 
			
		||||
  plugin: 'entity:taxonomy_term'
 | 
			
		||||
migration_dependencies: null
 | 
			
		||||
@@ -1,4 +1,4 @@
 | 
			
		||||
uuid: 0b1298bd-70ab-4250-9c98-0efbe6275ab2
 | 
			
		||||
uuid: a8817166-4585-4e4d-88c1-3179e9fea37e
 | 
			
		||||
langcode: fr
 | 
			
		||||
status: true
 | 
			
		||||
dependencies: {  }
 | 
			
		||||
 
 | 
			
		||||
@@ -1,4 +1,4 @@
 | 
			
		||||
uuid: 2ee1b95e-6eeb-403e-84ec-8075e4ab2618
 | 
			
		||||
uuid: 4a99b969-bf9d-41ad-b3cc-4268a57862e4
 | 
			
		||||
langcode: fr
 | 
			
		||||
status: true
 | 
			
		||||
dependencies: {  }
 | 
			
		||||
 
 | 
			
		||||
@@ -1,4 +1,4 @@
 | 
			
		||||
uuid: 9df858db-e8e2-4ae2-adaf-a16ac2308ebb
 | 
			
		||||
uuid: a0eb7934-fbb3-41d1-8963-1bbffa8b1428
 | 
			
		||||
langcode: fr
 | 
			
		||||
status: true
 | 
			
		||||
dependencies: {  }
 | 
			
		||||
 
 | 
			
		||||
@@ -1,4 +1,4 @@
 | 
			
		||||
uuid: 538e8fb8-91d7-4410-8d7f-5da0aa398302
 | 
			
		||||
uuid: e38bc46e-5cf1-4397-9f18-b70648397aa8
 | 
			
		||||
langcode: fr
 | 
			
		||||
status: true
 | 
			
		||||
dependencies:
 | 
			
		||||
 
 | 
			
		||||
@@ -12,8 +12,10 @@ dependencies:
 | 
			
		||||
    - field.storage.node.field_programme
 | 
			
		||||
    - field.storage.node.field_projet
 | 
			
		||||
    - field.storage.node.field_projets_lies
 | 
			
		||||
    - field.storage.node.field_ressources_liees
 | 
			
		||||
    - field.storage.node.field_theme
 | 
			
		||||
    - field.storage.node.field_themes_lies
 | 
			
		||||
    - field.storage.node.field_type_de_ressource
 | 
			
		||||
    - field.storage.node.field_type_de_theme
 | 
			
		||||
    - field.storage.node.field_ville
 | 
			
		||||
    - image.style.thumbnail
 | 
			
		||||
@@ -84,6 +86,7 @@ display:
 | 
			
		||||
            node_bulk_form: node_bulk_form
 | 
			
		||||
            field_diaporama: field_diaporama
 | 
			
		||||
            title: title
 | 
			
		||||
            field_type_de_ressource: title
 | 
			
		||||
            operations: title
 | 
			
		||||
            field_programme: field_programme
 | 
			
		||||
            field_projet: field_projet
 | 
			
		||||
@@ -110,6 +113,13 @@ display:
 | 
			
		||||
              separator: '<br/>'
 | 
			
		||||
              empty_column: false
 | 
			
		||||
              responsive: ''
 | 
			
		||||
            field_type_de_ressource:
 | 
			
		||||
              sortable: false
 | 
			
		||||
              default_sort_order: asc
 | 
			
		||||
              align: ''
 | 
			
		||||
              separator: ''
 | 
			
		||||
              empty_column: false
 | 
			
		||||
              responsive: ''
 | 
			
		||||
            operations:
 | 
			
		||||
              align: ''
 | 
			
		||||
              separator: ''
 | 
			
		||||
@@ -3330,14 +3340,14 @@ display:
 | 
			
		||||
          hide_alter_empty: true
 | 
			
		||||
          plugin_id: node_bulk_form
 | 
			
		||||
          entity_type: node
 | 
			
		||||
        field_diaporama:
 | 
			
		||||
          id: field_diaporama
 | 
			
		||||
          table: node__field_diaporama
 | 
			
		||||
          field: field_diaporama
 | 
			
		||||
        field_image:
 | 
			
		||||
          id: field_image
 | 
			
		||||
          table: node__field_image
 | 
			
		||||
          field: field_image
 | 
			
		||||
          relationship: none
 | 
			
		||||
          group_type: group
 | 
			
		||||
          admin_label: ''
 | 
			
		||||
          label: Diaporama
 | 
			
		||||
          label: Image
 | 
			
		||||
          exclude: false
 | 
			
		||||
          alter:
 | 
			
		||||
            alter_text: false
 | 
			
		||||
@@ -3386,7 +3396,7 @@ display:
 | 
			
		||||
          group_column: ''
 | 
			
		||||
          group_columns: {  }
 | 
			
		||||
          group_rows: true
 | 
			
		||||
          delta_limit: 1
 | 
			
		||||
          delta_limit: 0
 | 
			
		||||
          delta_offset: 0
 | 
			
		||||
          delta_reversed: false
 | 
			
		||||
          delta_first_last: false
 | 
			
		||||
@@ -3414,6 +3424,69 @@ display:
 | 
			
		||||
          settings:
 | 
			
		||||
            link_to_entity: true
 | 
			
		||||
          plugin_id: field
 | 
			
		||||
        field_type_de_ressource:
 | 
			
		||||
          id: field_type_de_ressource
 | 
			
		||||
          table: node__field_type_de_ressource
 | 
			
		||||
          field: field_type_de_ressource
 | 
			
		||||
          relationship: none
 | 
			
		||||
          group_type: group
 | 
			
		||||
          admin_label: ''
 | 
			
		||||
          label: 'Type de ressource'
 | 
			
		||||
          exclude: false
 | 
			
		||||
          alter:
 | 
			
		||||
            alter_text: false
 | 
			
		||||
            text: ''
 | 
			
		||||
            make_link: false
 | 
			
		||||
            path: ''
 | 
			
		||||
            absolute: false
 | 
			
		||||
            external: false
 | 
			
		||||
            replace_spaces: false
 | 
			
		||||
            path_case: none
 | 
			
		||||
            trim_whitespace: false
 | 
			
		||||
            alt: ''
 | 
			
		||||
            rel: ''
 | 
			
		||||
            link_class: ''
 | 
			
		||||
            prefix: ''
 | 
			
		||||
            suffix: ''
 | 
			
		||||
            target: ''
 | 
			
		||||
            nl2br: false
 | 
			
		||||
            max_length: 0
 | 
			
		||||
            word_boundary: true
 | 
			
		||||
            ellipsis: true
 | 
			
		||||
            more_link: false
 | 
			
		||||
            more_link_text: ''
 | 
			
		||||
            more_link_path: ''
 | 
			
		||||
            strip_tags: false
 | 
			
		||||
            trim: false
 | 
			
		||||
            preserve_tags: ''
 | 
			
		||||
            html: false
 | 
			
		||||
          element_type: ''
 | 
			
		||||
          element_class: ''
 | 
			
		||||
          element_label_type: ''
 | 
			
		||||
          element_label_class: ''
 | 
			
		||||
          element_label_colon: true
 | 
			
		||||
          element_wrapper_type: ''
 | 
			
		||||
          element_wrapper_class: ''
 | 
			
		||||
          element_default_classes: true
 | 
			
		||||
          empty: ''
 | 
			
		||||
          hide_empty: false
 | 
			
		||||
          empty_zero: false
 | 
			
		||||
          hide_alter_empty: true
 | 
			
		||||
          click_sort_column: target_id
 | 
			
		||||
          type: entity_reference_label
 | 
			
		||||
          settings:
 | 
			
		||||
            link: true
 | 
			
		||||
          group_column: target_id
 | 
			
		||||
          group_columns: {  }
 | 
			
		||||
          group_rows: true
 | 
			
		||||
          delta_limit: 0
 | 
			
		||||
          delta_offset: 0
 | 
			
		||||
          delta_reversed: false
 | 
			
		||||
          delta_first_last: false
 | 
			
		||||
          multi_type: separator
 | 
			
		||||
          separator: ', '
 | 
			
		||||
          field_api_classes: false
 | 
			
		||||
          plugin_id: field
 | 
			
		||||
        operations:
 | 
			
		||||
          id: operations
 | 
			
		||||
          table: node
 | 
			
		||||
@@ -3653,6 +3726,69 @@ display:
 | 
			
		||||
          separator: ', '
 | 
			
		||||
          field_api_classes: false
 | 
			
		||||
          plugin_id: field
 | 
			
		||||
        field_ressources_liees:
 | 
			
		||||
          id: field_ressources_liees
 | 
			
		||||
          table: node__field_ressources_liees
 | 
			
		||||
          field: field_ressources_liees
 | 
			
		||||
          relationship: none
 | 
			
		||||
          group_type: group
 | 
			
		||||
          admin_label: ''
 | 
			
		||||
          label: Ressources
 | 
			
		||||
          exclude: false
 | 
			
		||||
          alter:
 | 
			
		||||
            alter_text: false
 | 
			
		||||
            text: ''
 | 
			
		||||
            make_link: false
 | 
			
		||||
            path: ''
 | 
			
		||||
            absolute: false
 | 
			
		||||
            external: false
 | 
			
		||||
            replace_spaces: false
 | 
			
		||||
            path_case: none
 | 
			
		||||
            trim_whitespace: false
 | 
			
		||||
            alt: ''
 | 
			
		||||
            rel: ''
 | 
			
		||||
            link_class: ''
 | 
			
		||||
            prefix: ''
 | 
			
		||||
            suffix: ''
 | 
			
		||||
            target: ''
 | 
			
		||||
            nl2br: false
 | 
			
		||||
            max_length: 0
 | 
			
		||||
            word_boundary: true
 | 
			
		||||
            ellipsis: true
 | 
			
		||||
            more_link: false
 | 
			
		||||
            more_link_text: ''
 | 
			
		||||
            more_link_path: ''
 | 
			
		||||
            strip_tags: false
 | 
			
		||||
            trim: false
 | 
			
		||||
            preserve_tags: ''
 | 
			
		||||
            html: false
 | 
			
		||||
          element_type: ''
 | 
			
		||||
          element_class: ''
 | 
			
		||||
          element_label_type: ''
 | 
			
		||||
          element_label_class: ''
 | 
			
		||||
          element_label_colon: true
 | 
			
		||||
          element_wrapper_type: ''
 | 
			
		||||
          element_wrapper_class: ''
 | 
			
		||||
          element_default_classes: true
 | 
			
		||||
          empty: ''
 | 
			
		||||
          hide_empty: false
 | 
			
		||||
          empty_zero: false
 | 
			
		||||
          hide_alter_empty: true
 | 
			
		||||
          click_sort_column: target_id
 | 
			
		||||
          type: entity_reference_label
 | 
			
		||||
          settings:
 | 
			
		||||
            link: true
 | 
			
		||||
          group_column: target_id
 | 
			
		||||
          group_columns: {  }
 | 
			
		||||
          group_rows: true
 | 
			
		||||
          delta_limit: 0
 | 
			
		||||
          delta_offset: 0
 | 
			
		||||
          delta_reversed: false
 | 
			
		||||
          delta_first_last: false
 | 
			
		||||
          multi_type: ul
 | 
			
		||||
          separator: ', '
 | 
			
		||||
          field_api_classes: false
 | 
			
		||||
          plugin_id: field
 | 
			
		||||
        field_poid:
 | 
			
		||||
          id: field_poid
 | 
			
		||||
          table: node__field_poid
 | 
			
		||||
@@ -3839,9 +3975,11 @@ display:
 | 
			
		||||
        - user.permissions
 | 
			
		||||
      max-age: 0
 | 
			
		||||
      tags:
 | 
			
		||||
        - 'config:field.storage.node.field_diaporama'
 | 
			
		||||
        - 'config:field.storage.node.field_image'
 | 
			
		||||
        - 'config:field.storage.node.field_memo'
 | 
			
		||||
        - 'config:field.storage.node.field_poid'
 | 
			
		||||
        - 'config:field.storage.node.field_programme'
 | 
			
		||||
        - 'config:field.storage.node.field_projet'
 | 
			
		||||
        - 'config:field.storage.node.field_ressources_liees'
 | 
			
		||||
        - 'config:field.storage.node.field_theme'
 | 
			
		||||
        - 'config:field.storage.node.field_type_de_ressource'
 | 
			
		||||
 
 | 
			
		||||
@@ -55,25 +55,72 @@ process:
 | 
			
		||||
 | 
			
		||||
  field_poid: field_poids
 | 
			
		||||
 | 
			
		||||
  # body: body
 | 
			
		||||
  field_type_de_ressource:
 | 
			
		||||
    plugin: migration_lookup
 | 
			
		||||
    migration: d7_taxonomy_term_type_doc
 | 
			
		||||
    source: field_popsu_doc_type
 | 
			
		||||
    no_stub: true
 | 
			
		||||
 | 
			
		||||
  # field_diaporama:
 | 
			
		||||
  #   plugin: sub_process
 | 
			
		||||
  #   source: diaporama
 | 
			
		||||
  #   process:
 | 
			
		||||
  #     target_id:
 | 
			
		||||
  #       plugin: migration_lookup
 | 
			
		||||
  #       migration: d7_allpublicfiles
 | 
			
		||||
  #       source: fid
 | 
			
		||||
  #       no_stub: true
 | 
			
		||||
  #     alt: alt
 | 
			
		||||
  #     title: title
 | 
			
		||||
  #
 | 
			
		||||
  # field_textes: field_textes
 | 
			
		||||
  #
 | 
			
		||||
  # field_equipes: field_equipes
 | 
			
		||||
  #
 | 
			
		||||
  # field_partenaires: field_partenaires
 | 
			
		||||
  field_sous_titre:
 | 
			
		||||
    plugin: sub_process
 | 
			
		||||
    source: field_popsu_publication_soustitr
 | 
			
		||||
    process:
 | 
			
		||||
      value: value
 | 
			
		||||
      # summary: summary
 | 
			
		||||
      # format:
 | 
			
		||||
      #   plugin: default_value
 | 
			
		||||
      #   default_value: wysiwyg
 | 
			
		||||
 | 
			
		||||
  field_edition:
 | 
			
		||||
    plugin: sub_process
 | 
			
		||||
    source: field_popsu_doc_source
 | 
			
		||||
    process:
 | 
			
		||||
      value: value
 | 
			
		||||
      summary: summary
 | 
			
		||||
      format:
 | 
			
		||||
        plugin: default_value
 | 
			
		||||
        default_value: wysiwyg
 | 
			
		||||
 | 
			
		||||
  body:
 | 
			
		||||
    plugin: sub_process
 | 
			
		||||
    source: body
 | 
			
		||||
    process:
 | 
			
		||||
      value: value
 | 
			
		||||
      summary: summary
 | 
			
		||||
      format:
 | 
			
		||||
        plugin: default_value
 | 
			
		||||
        default_value: wysiwyg
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
  field_image:
 | 
			
		||||
    plugin: sub_process
 | 
			
		||||
    source: field_popsu_publication_cover
 | 
			
		||||
    process:
 | 
			
		||||
      target_id:
 | 
			
		||||
        plugin: migration_lookup
 | 
			
		||||
        migration: d7_allpublicfiles
 | 
			
		||||
        source: fid
 | 
			
		||||
        no_stub: true
 | 
			
		||||
      alt: alt
 | 
			
		||||
      title: title
 | 
			
		||||
 | 
			
		||||
  field_fichier:
 | 
			
		||||
    plugin: sub_process
 | 
			
		||||
    source: field_popsu_doc_files
 | 
			
		||||
    process:
 | 
			
		||||
      target_id:
 | 
			
		||||
        plugin: migration_lookup
 | 
			
		||||
        migration: d7_allpublicfiles
 | 
			
		||||
        source: fid
 | 
			
		||||
        no_stub: true
 | 
			
		||||
      display: display
 | 
			
		||||
      description: description
 | 
			
		||||
 | 
			
		||||
  field_ressources_liees:
 | 
			
		||||
    plugin: migration_lookup
 | 
			
		||||
    migration: d7_node_ressource
 | 
			
		||||
    source: field_projet
 | 
			
		||||
    no_stub: true
 | 
			
		||||
 | 
			
		||||
  field_memo: field_memo
 | 
			
		||||
 | 
			
		||||
@@ -81,4 +128,4 @@ migration_dependencies:
 | 
			
		||||
  required:
 | 
			
		||||
    - d7_allpublicfiles
 | 
			
		||||
    - d7_users
 | 
			
		||||
    - d7_taxonomy_term_type_theme
 | 
			
		||||
    - d7_taxonomy_term_type_doc
 | 
			
		||||
 
 | 
			
		||||
@@ -91,7 +91,7 @@ class D7NodeRessource extends FieldableEntity {
 | 
			
		||||
        'log',
 | 
			
		||||
        'timestamp',
 | 
			
		||||
      ])
 | 
			
		||||
      ->orderBy('changed');
 | 
			
		||||
      ->orderBy('type', 'DESC');
 | 
			
		||||
 | 
			
		||||
    $query->addField('n', 'uid', 'node_uid');
 | 
			
		||||
    $query->addField('nr', 'uid', 'revision_uid');
 | 
			
		||||
@@ -110,7 +110,7 @@ class D7NodeRessource extends FieldableEntity {
 | 
			
		||||
    $vid = $row->getSourceProperty('vid');
 | 
			
		||||
    $type = $row->getSourceProperty('type');
 | 
			
		||||
    $title = $row->getSourceProperty('title');
 | 
			
		||||
    Drush::output()->writeln('- - - - ' . $title . ' ('.$nid.')' . '- - - - ');
 | 
			
		||||
    Drush::output()->writeln('- - - - ' . $title . ' ('.$nid.')'. ' ['.$type.']' . '- - - - ');
 | 
			
		||||
 | 
			
		||||
    $memo = '';
 | 
			
		||||
    $memo .= "#migration : old nid = ".$nid."\n";
 | 
			
		||||
@@ -120,10 +120,12 @@ class D7NodeRessource extends FieldableEntity {
 | 
			
		||||
    foreach ($this->getFields('node', $type) as $field_name => $field) {
 | 
			
		||||
      $field_values = $this->getFieldValues('node', $field_name, $nid, $vid, NULL);
 | 
			
		||||
      $row->setSourceProperty($field_name, $field_values);
 | 
			
		||||
      // if ($field_name == 'field_poids') {
 | 
			
		||||
      //   $field_values = $field_values[0];
 | 
			
		||||
      //   Drush::output()->writeln(dump($field_values));
 | 
			
		||||
      // }
 | 
			
		||||
      switch ($field_name) {
 | 
			
		||||
        case 'field_popsu_publication_body':
 | 
			
		||||
        case 'field_popsu_doc_body':
 | 
			
		||||
          $row->setSourceProperty("body", $field_values);
 | 
			
		||||
          break;
 | 
			
		||||
      }
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    if ($type === "popsu_publication") {
 | 
			
		||||
@@ -158,7 +160,7 @@ class D7NodeRessource extends FieldableEntity {
 | 
			
		||||
        case 'popsu_projet':
 | 
			
		||||
          // Drush::output()->writeln(dump($node));
 | 
			
		||||
          $node['target_id'] = $node['nid'];
 | 
			
		||||
          $field_projet = $node;
 | 
			
		||||
          $row->setSourceProperty('field_projet', $node);
 | 
			
		||||
          break;
 | 
			
		||||
        // Theme
 | 
			
		||||
        case 'popsu_theme_europe':
 | 
			
		||||
@@ -166,6 +168,12 @@ class D7NodeRessource extends FieldableEntity {
 | 
			
		||||
        case 'popsu_theme_local':
 | 
			
		||||
          $node['target_id'] = $node['nid'];
 | 
			
		||||
          $field_theme = $node;
 | 
			
		||||
          break;
 | 
			
		||||
        // publication
 | 
			
		||||
        case 'popsu_publication':
 | 
			
		||||
          $node['target_id'] = $node['nid'];
 | 
			
		||||
          $row->setSourceProperty('field_ressources_liees', $node);
 | 
			
		||||
          break;
 | 
			
		||||
      }
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
@@ -195,11 +203,6 @@ class D7NodeRessource extends FieldableEntity {
 | 
			
		||||
      $row->setSourceProperty('field_programme', array(array('nid'=>$prog[0]['nid'])));
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    if (!empty($field_projet)) {
 | 
			
		||||
      // Drush::output()->writeln(dump($field_projet));
 | 
			
		||||
      $row->setSourceProperty('field_projet', $field_projet);
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    if (!empty($field_theme)) {
 | 
			
		||||
      // Drush::output()->writeln(dump($field_theme));
 | 
			
		||||
      $row->setSourceProperty('field_theme', $field_theme);
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user