46 lines
1.1 KiB
YAML
46 lines
1.1 KiB
YAML
|
|
# Migration configuration for importing content paragraphs.
|
||
|
|
id: cdesai_paragraphs
|
||
|
|
label: Import Content Paragraphs from Text File Archive
|
||
|
|
migration_group: CDESAI
|
||
|
|
|
||
|
|
source:
|
||
|
|
# Upload source files at /admin/config/development/cdesai/migrate.
|
||
|
|
plugin: cdesai_paragraph_migrate_source
|
||
|
|
|
||
|
|
process:
|
||
|
|
langcode: en
|
||
|
|
|
||
|
|
field_body/value:
|
||
|
|
# Skips a row if skip_migration property is set to TRUE.
|
||
|
|
-
|
||
|
|
plugin: skip_on_value
|
||
|
|
equals: true
|
||
|
|
source: skip_migration
|
||
|
|
value: 'TRUE'
|
||
|
|
method: row
|
||
|
|
# Skips a row if scrapped property is set to FALSE.
|
||
|
|
-
|
||
|
|
plugin: skip_on_value
|
||
|
|
equals: true
|
||
|
|
source: scrapped
|
||
|
|
value: 'FALSE'
|
||
|
|
method: row
|
||
|
|
# Uses the custom process plugin to extract paragraph contents from a text file.
|
||
|
|
-
|
||
|
|
plugin: extract_file_contents
|
||
|
|
source: content_file
|
||
|
|
|
||
|
|
field_body/format:
|
||
|
|
plugin: default_value
|
||
|
|
default_value: rich_text
|
||
|
|
|
||
|
|
destination:
|
||
|
|
plugin: 'entity_reference_revisions:paragraph'
|
||
|
|
default_bundle: basic
|
||
|
|
|
||
|
|
# use forced module dependency so uninstall/reinstall works properly
|
||
|
|
dependencies:
|
||
|
|
enforced:
|
||
|
|
module:
|
||
|
|
- cdesai_migrate
|