rocketship_core-8.x-2.0-alpha11/modules/rocketship_content/config/install/migrate_plus.migration.rocketship_pages.yml

modules/rocketship_content/config/install/migrate_plus.migration.rocketship_pages.yml
dependencies:
  enforced:
    module:
      - rocketship_page
      - rocketship_core
id: rocketship_pages
migration_group: rocketship_content
source:
  plugin: csv
  path: /assets/csv/pages.csv
  header_row_count: 1
  keys:
    - id
process:
  title: title
  uuid: uuid
  field_description: field_description
  node_keeper: node_keeper
  field_paragraphs:
  # Explode the value so we have support for multiple paragraphs
    -
      plugin: explode
      source: field_paragraphs
      delimiter: '|'
  # Perform a lookup on each exploded value to get the info from the paragraphs migration
  # This returns an array containing target_id and target_revision_id for each originally exploded
  # value
    -
      plugin: migration_lookup
      migration: rc_text_main_p
      no_stub: true
  # Iterate over the values returned from migration_lookup (an array of arrays)
  # Process them by assigning index 0 to target_id and index 1 to revision_id
    -
      plugin: iterator
      process:
        target_id: '0'
        target_revision_id: '1'
  field_header_paragraph:
    -
      plugin: explode
      source: field_header_paragraph
      delimiter: '|'
    -
      plugin: migration_lookup
      migration: rc_simple_header
      no_stub: true
    -
      plugin: iterator
      process:
        target_id: '0'
        target_revision_id: '1'
destination:
  plugin: 'entity:node'
  default_bundle: page
migration_dependencies:
  required:
    - rc_text_main_p
    - rc_simple_header
  optional: { }

Главная | Обратная связь

drupal hosting | друпал хостинг | it patrol .inc