drupalorg_migrate-1.0.x-dev/migrations/drupalorg_migrate_guide.yml

migrations/drupalorg_migrate_guide.yml
id: drupalorg_migrate_guide
label: 'Drupal.org Documentation Guide'
migration_group: drupalorg_migrate
# Commenting out the below will require the d7_file migration.
#migration_tags:
#  - Drupal 7
#  - Content

#deriver: Drupal\node\Plugin\migrate\D7NodeDeriver
source:
  plugin: d7_node
  batch_size: 1000
  track_changes: true
  node_type: guide

destination:
  plugin: entity:node

process:
  nid: tnid
  type:
    plugin: default_value
    default_value: guide
  langcode:
    plugin: default_value
    source: language
    default_value: "und"
  title: title
  uid:
    plugin: migration_lookup
    migration: drupalorg_migrate_users
    source: node_uid
  status: status
  created: created
  changed: changed
  promote: promote
  sticky: sticky

  field_tags:
    plugin: sub_process
    source: tags
    process:
      target_id:
        plugin: migration_lookup
        migration: drupalorg_migrate_tags
        source: tid
  body: body
  field_related_content:
    plugin: sub_process
    source: field_related_content
    process:
      target_id:
        plugin: migration_lookup
        migration:
          - drupalorg_migrate_post
          - drupalorg_migrate_documentation
          - drupalorg_migrate_guide
          - drupalorg_migrate_changenotice
          - drupalorg_migrate_page
        source: target_id
        no_stub: true
  upload:
    plugin: sub_process
    source: upload
    process:
      target_id:
        plugin: migration_lookup
        migration:
          - drupalorg_migrate_guide_media_images
          - drupalorg_migrate_guide_media_documents
        source: fid
  field_summary: field_summary
  og_group_ref_documentation/target_id:
    plugin: og_entity_ref
    source: '@nid'
    og_source_field: og_group_ref_documentation
  field_new_page_and_guide_review: field_new_page_and_guide_review
  # @todo fill out once the "section" node type has a migration
  # field_parent_section: field_parent_section
  field_asciidoc_source_file: field_asciidoc_source_file
  field_guide_status: field_guide_status
# @todo Test this as the field is new. Is there any field on D7 that might be equivalent?
#  field_weight:
#    plugin: default_value
#    default_value: 0

migration_dependencies:
  optional:
    - drupalorg_migrate_users
    - drupalorg_migrate_guide_media_images
    - drupalorg_migrate_guide_media_documents
    - drupalorg_migrate_tags
    - drupalorg_migrate_post
    - drupalorg_migrate_documentation
    - drupalorg_migrate_changenotice
    - drupalorg_migrate_page

dependencies:
  enforced:
    module:
      - drupalorg_migrate

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

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