Skip to content

Commit

Permalink
release(2.21.0): add tipologia_finanziamenti taxonomy and taxonomy cu…
Browse files Browse the repository at this point in the history
…stomization feature ouitoulia/diagraphe#15
  • Loading branch information
arturu committed Apr 18, 2024
1 parent 5953f8d commit ee3c36f
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 15 deletions.
24 changes: 19 additions & 5 deletions config/install/migrate_plus.migration.demo_taxonomy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,18 +49,24 @@ source:
- name: icon
label: 'Icona'
selector: attributes/icon
- name: element_type
label: 'Tipo di elemento'
selector: attributes/type
- name: description
label: 'La descrizione della voce di tassonomia'
selector: attributes/description
- name: weight
label: 'Il peso della voce di tassonomia'
selector: attributes/weight
- name: copertina
label: 'Immagine di copertina'
selector: relationships/copertina/data/id
- name: parent_id
label: 'Id del termine genitore della voce di tassonomia'
selector: relationships/parent/data/id
- name: copertina
label: 'Immagine di copertina'
selector: relationships/copertina/data/id
- name: published
label: 'Se la voce è pubblicata o meno'
selector: attributes/published

ids:
tid:
Expand All @@ -74,6 +80,10 @@ process:
- plugin: skip_on_empty
method: process
source: icon
field_type:
plugin: skip_on_empty
source: element_type
method: process
parent_id:
- plugin: skip_on_empty
method: process
Expand All @@ -88,14 +98,18 @@ process:
plugin: default_value
source: weight
default_value: 0
description:
description/value:
- plugin: skip_on_empty
method: process
source: description
method: process
description/format:
- plugin: default_value
default_value: bootstrap_italia_2
field_copertina:
plugin: skip_on_empty
source: copertina
method: process
status: published

destination:
plugin: entity:taxonomy_term
Expand Down
9 changes: 4 additions & 5 deletions config/install/migrate_plus.migration.taxonomy_common.yml
Original file line number Diff line number Diff line change
Expand Up @@ -107,11 +107,10 @@ process:
plugin: skip_on_empty
source: copertina
method: process
# Ho commentato questo campo per non sovrascrivere l'eventuale stato modificato
# status:
# plugin: default_value
# source: published
# default_value: 1
status:
plugin: default_value
source: published
default_value: 1

destination:
plugin: entity:taxonomy_term
Expand Down
10 changes: 5 additions & 5 deletions config/install/migrate_plus.migration.taxonomy_common_uuid.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ source:
- 'https://ouitoulia.github.io/krene/taxonomy/stato_progetti.json'
- 'https://ouitoulia.github.io/krene/taxonomy/tipologia_autenticazioni.json'
- 'https://ouitoulia.github.io/krene/taxonomy/tipologia_eventi.json'
- 'https://ouitoulia.github.io/krene/taxonomy/tipologia_finanziamenti.json'
- 'https://ouitoulia.github.io/krene/taxonomy/tipologia_incarichi.json'
- 'https://ouitoulia.github.io/krene/taxonomy/tipologia_istituti.json'
- 'https://ouitoulia.github.io/krene/taxonomy/tipologia_libri.json'
Expand Down Expand Up @@ -136,11 +137,10 @@ process:
plugin: skip_on_empty
source: copertina
method: process
# Ho commentato questo campo per non sovrascrivere l'eventuale stato modificato
# status:
# plugin: default_value
# source: published
# default_value: 1
status:
plugin: default_value
source: published
default_value: 1

destination:
plugin: entity:taxonomy_term
Expand Down

0 comments on commit ee3c36f

Please sign in to comment.