-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
release(1.9.0): add piano di studi demo
- Loading branch information
Showing
4 changed files
with
230 additions
and
12 deletions.
There are no files selected for viewing
2 changes: 1 addition & 1 deletion
2
config/install/migrate_plus.migration.demo_paragraph_call_to_action.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
111 changes: 111 additions & 0 deletions
111
config/install/migrate_plus.migration.demo_paragraph_piano_di_studi.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,111 @@ | ||
id: demo_paragraph_piano_di_studi | ||
label: Paragrafo piano di studi | ||
migration_group: scuola_demo | ||
migration_tags: | ||
- json | ||
- scuola | ||
- demo | ||
- demo_paragraph | ||
- demo_paragraph_piano_di_studi | ||
|
||
source: | ||
plugin: url | ||
data_fetcher_plugin: http | ||
data_parser_plugin: json | ||
|
||
headers: | ||
Accept: 'application/json; charset=utf-8' | ||
Content-Type: 'application/json' | ||
|
||
# The data_parser normally limits the fields passed on to the source plugin | ||
# to fields configured to be used as part of the migration. To support more | ||
# dynamic migrations, the JSON data parser supports including the original | ||
# data for the current row. Simply include the 'include_raw_data' flag set | ||
# to `true` to enable this. This option is disabled by default to minimize | ||
# memory footprint for migrations that do not need this capability. | ||
# include_raw_data: false | ||
|
||
# Flags whether to track changes to incoming data. If TRUE, we will maintain | ||
# hashed source rows to determine whether incoming data has changed. | ||
# track_changes: false | ||
|
||
urls: | ||
- 'https://ouitoulia.github.io/krene/demo/paragraph_piano_di_studi.json' | ||
|
||
# An xpath-like selector corresponding to the items to be imported. | ||
item_selector: data | ||
|
||
fields: | ||
- name: id | ||
label: 'ID del paragrafo' | ||
selector: id | ||
- name: type | ||
label: 'Il tipo di paragrafo' | ||
selector: type | ||
|
||
# Campi | ||
- name: tipo_periodo | ||
label: "Il tipo di periodo" | ||
selector: attributes/tipo_periodo | ||
- name: periodo | ||
label: "Il periodo" | ||
selector: attributes/periodo | ||
- name: kicker | ||
label: "L'intestazione'" | ||
selector: attributes/kicker | ||
- name: text | ||
label: "Le note" | ||
selector: attributes/text | ||
- name: piano_di_studi_item | ||
label: "I paragrafi piano di studi item collegati" | ||
selector: relationships/piano_di_studi_item/data/paragraph | ||
|
||
# Footer | ||
- name: language | ||
label: 'La lingua del contenuto' | ||
selector: language | ||
|
||
ids: | ||
id: | ||
type: integer | ||
|
||
process: | ||
id: id | ||
type: type | ||
|
||
# Campi | ||
field_tipo_periodo: tipo_periodo | ||
field_periodo: periodo | ||
field_kicker: kicker | ||
field_text: text | ||
_piano_di_studi_item: | ||
plugin: migration_lookup | ||
migration: demo_paragraph_piano_di_studi_item | ||
source: piano_di_studi_item | ||
field_piano_di_studi_item: | ||
plugin: sub_process | ||
source: '@_piano_di_studi_item' | ||
process: | ||
target_id: '0' | ||
target_revision_id: '1' | ||
|
||
# Footer | ||
langcode: | ||
plugin: default_value | ||
source: language | ||
default_value: "und" | ||
|
||
destination: | ||
plugin: 'entity_reference_revisions:paragraph' | ||
default_bundle: piano_di_studi | ||
|
||
migration_dependencies: | ||
required: | ||
- taxonomy_common | ||
- piano_di_studi_item | ||
|
||
dependencies: | ||
enforced: | ||
module: | ||
- sunchronizo | ||
|
93 changes: 93 additions & 0 deletions
93
config/install/migrate_plus.migration.demo_paragraph_piano_di_studi_item.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,93 @@ | ||
id: demo_paragraph_piano_di_studi_item | ||
label: Paragrafo piano di studi item | ||
migration_group: scuola_demo | ||
migration_tags: | ||
- json | ||
- scuola | ||
- demo | ||
- demo_paragraph | ||
- demo_paragraph_piano_di_studi_item | ||
|
||
source: | ||
plugin: url | ||
data_fetcher_plugin: http | ||
data_parser_plugin: json | ||
|
||
headers: | ||
Accept: 'application/json; charset=utf-8' | ||
Content-Type: 'application/json' | ||
|
||
# The data_parser normally limits the fields passed on to the source plugin | ||
# to fields configured to be used as part of the migration. To support more | ||
# dynamic migrations, the JSON data parser supports including the original | ||
# data for the current row. Simply include the 'include_raw_data' flag set | ||
# to `true` to enable this. This option is disabled by default to minimize | ||
# memory footprint for migrations that do not need this capability. | ||
# include_raw_data: false | ||
|
||
# Flags whether to track changes to incoming data. If TRUE, we will maintain | ||
# hashed source rows to determine whether incoming data has changed. | ||
# track_changes: false | ||
|
||
urls: | ||
- 'https://ouitoulia.github.io/krene/demo/paragraph_piano_di_studi_item.json' | ||
|
||
# An xpath-like selector corresponding to the items to be imported. | ||
item_selector: data | ||
|
||
fields: | ||
- name: id | ||
label: 'ID del paragrafo' | ||
selector: id | ||
- name: type | ||
label: 'Il tipo di paragrafo' | ||
selector: type | ||
|
||
# Campi | ||
- name: materia | ||
label: "La materia collegata alla tassonomia" | ||
selector: relationships/materia/data/id | ||
- name: ore_settimanali | ||
label: "Le ore settimanali" | ||
selector: attributes/ore_settimanali | ||
- name: monte_ore | ||
label: "Il monte ore annuale" | ||
selector: attributes/monte_ore | ||
|
||
# Footer | ||
- name: language | ||
label: 'La lingua del contenuto' | ||
selector: language | ||
|
||
ids: | ||
id: | ||
type: integer | ||
|
||
process: | ||
id: id | ||
type: type | ||
|
||
# Campi | ||
field_materia: materia | ||
field_ore_settimanali: ore_settimanali | ||
field_monte_ore: monte_ore | ||
|
||
# Footer | ||
langcode: | ||
plugin: default_value | ||
source: language | ||
default_value: "und" | ||
|
||
destination: | ||
plugin: 'entity_reference_revisions:paragraph' | ||
default_bundle: piano_di_studi_item | ||
|
||
migration_dependencies: | ||
required: | ||
- taxonomy_common | ||
|
||
dependencies: | ||
enforced: | ||
module: | ||
- sunchronizo | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters