field_attachments, field_visuel, admin node view

This commit is contained in:
Bachir Soussi Chiadmi 2018-12-16 21:29:58 +01:00
parent b2dbacb786
commit 86792830fb
18 changed files with 167 additions and 38 deletions

View File

@ -71,8 +71,19 @@ process:
plugin: migration_lookup
migration: d7_node_materiau
no_stub: true
# field_visuel: field_visuel
field_visuel:
plugin: iterator
source: field_visuel
process:
target_id:
plugin: migration_lookup
migration: d7_allpublicfiles
source: fid
no_stub: true
alt: alt
title: title
height: height
width: width
migration_dependencies:

View File

@ -94,17 +94,6 @@ process:
plugin: migration_lookup
migration: d7_node_breve
no_stub: true
# field_materiau_images:
# -
# plugin: skip_on_empty
# method: process
# source: field_materiau_image
# -
# plugin: migration_lookup
# migration: d7_allpublicfiles
# no_stub: true
field_materiau_images:
plugin: iterator
source: field_materiau_image
@ -118,8 +107,17 @@ process:
title: title
height: height
width: width
# field_attachments: field_attachments
field_attachments:
plugin: iterator
source: field_attachments
process:
target_id:
plugin: migration_lookup
migration: d7_allpublicfiles
source: fid
no_stub: true
# there is no description field filled
description: description
# field_famille: field_famille
# field_index: field_identifiant

View File

@ -112,12 +112,17 @@ process:
3: "workflow_visible"
4: "workflow_imported"
5: "workflow_edited"
# work in progress
# not ready
# field_attachments: field_attachments
field_attachments:
plugin: iterator
source: field_attachments
process:
target_id:
plugin: migration_lookup
migration: d7_allpublicfiles
source: fid
no_stub: true
# there is no description field filled
description: description
migration_dependencies:
required:

View File

@ -33,3 +33,5 @@ https://evolvingweb.ca/blog/drupal-8-migration-migrating-taxonomy-term-reference
[Drupal 8 Migrations: Taxonomy and Nodes](https://www.phase2technology.com/blog/drupal-8-migrations)
[Migrating Content Translated with "Content Translation" from Drupal 7 to Drupal 8](https://evolvingweb.ca/blog/migrating-content-translated-content-translation-drupal-7-drupal-8)
[Drupal 8 Migration Survival Strategies](http://pnijjar.freeshell.org/2017/drupal8-migrate/)

View File

@ -110,7 +110,7 @@ class D7NodeBreve extends FieldableEntity {
$vid = $row->getSourceProperty('vid');
$type = $row->getSourceProperty('type');
$title = $row->getSourceProperty('title');
drush_print('-- '.$nid."\t".$title);
// drush_print('-- '.$nid."\t".$title);
// If this entity was translated using Entity Translation, we need to get
// its source language to get the field values in the right language.

View File

@ -110,7 +110,7 @@ class D7NodeMateriau extends FieldableEntity {
$vid = $row->getSourceProperty('vid');
$type = $row->getSourceProperty('type');
$title = $row->getSourceProperty('title');
drush_print('-- '.$nid."\t".$title);
// drush_print('-- '.$nid."\t".$title);
// If this entity was translated using Entity Translation, we need to get
// its source language to get the field values in the right language.

View File

@ -108,7 +108,7 @@ class D7TaxonomyTermCompany extends FieldableEntity implements ContainerFactoryP
public function prepareRow(Row $row) {
$language = $row->getSourceProperty('language');
$tid = $row->getSourceProperty('tid');
drush_print('-- '.$language."\t".$tid."\t".$row->getSourceProperty('name'));
// drush_print('-- '.$language."\t".$tid."\t".$row->getSourceProperty('name'));
// vocabulary machine name
$machine_name = $row->getSourceProperty('machine_name');

View File

@ -1,4 +1,4 @@
uuid: e9e634ba-e831-4c89-8b64-5997702fbff5
uuid: a7bc7a67-a8ab-4d55-9a8f-f2e21e4e7145
langcode: en
status: true
dependencies: { }

View File

@ -1,9 +1,9 @@
uuid: c777e844-a495-40da-8402-036f21e452e7
uuid: 0a46ed54-515f-40a0-8147-ac71d58c3f6c
langcode: en
status: true
dependencies: { }
_core:
default_config_hash: gPxxnSd49zf1QfNvGH3ViddhP7nm_RL6VAjAbHTcPs8
default_config_hash: KoO_LBuLNgKvzDrrix4nuXbkzp6XWlQaUp9_mpK-tqU
id: d7_node_breve
class: null
field_plugin_method: null
@ -71,6 +71,19 @@ process:
plugin: migration_lookup
migration: d7_node_materiau
no_stub: true
field_visuel:
plugin: iterator
source: field_visuel
process:
target_id:
plugin: migration_lookup
migration: d7_allpublicfiles
source: fid
no_stub: true
alt: alt
title: title
height: height
width: width
destination:
plugin: 'entity:node'
migration_dependencies:

View File

@ -1,9 +1,9 @@
uuid: 26142c74-11b6-46a0-b5c3-1b9a336fdddc
uuid: 9ff8173a-d98d-44f3-ad8b-aa7fc344ffca
langcode: en
status: true
dependencies: { }
_core:
default_config_hash: Qh2aI8a_A0jio8zsJ4X_BCwZaEXx_yUBr79LFBIyfBM
default_config_hash: DnMjLkb9wXzqI2NMRiu9dKN5NujCtPmjLtvff6sz1Rk
id: d7_node_materiau
class: null
field_plugin_method: null
@ -106,6 +106,16 @@ process:
title: title
height: height
width: width
field_attachments:
plugin: iterator
source: field_attachments
process:
target_id:
plugin: migration_lookup
migration: d7_allpublicfiles
source: fid
no_stub: true
description: description
destination:
plugin: 'entity:node'
migration_dependencies:

View File

@ -1,9 +1,9 @@
uuid: caa7cb3d-f928-4fa2-880e-afd5d2b0ac22
uuid: 97152dee-a197-455a-942b-35585342b022
langcode: en
status: true
dependencies: { }
_core:
default_config_hash: Oqay_eEJOv9kUDIZVDJCvbpeQnyz_Y0HX_RSjI_T-Qw
default_config_hash: Y7surKNH2d9UWee4zzr6yzSyfIruwBMTs1xSoL_ShG4
id: d7_taxonomy_term_company
class: null
field_plugin_method: null
@ -96,6 +96,16 @@ process:
3: workflow_visible
4: workflow_imported
5: workflow_edited
field_attachments:
plugin: iterator
source: field_attachments
process:
target_id:
plugin: migration_lookup
migration: d7_allpublicfiles
source: fid
no_stub: true
description: description
destination:
plugin: 'entity:taxonomy_term'
migration_dependencies:

View File

@ -1,4 +1,4 @@
uuid: a81f9dd6-176e-4347-a077-1f782690216f
uuid: ce9f81b5-4979-4f90-856a-a501f8e32d5e
langcode: en
status: true
dependencies: { }

View File

@ -1,4 +1,4 @@
uuid: f420ec37-3b07-40b3-a4f8-f65c852191e6
uuid: ce7a00bb-f73b-468d-92ad-abde0e21f120
langcode: en
status: true
dependencies: { }

View File

@ -1,4 +1,4 @@
uuid: c0989c5b-2600-40d8-83cd-93816d581dc9
uuid: 0eb8dd85-169f-4096-9aba-da1292c7a3dd
langcode: en
status: true
dependencies: { }

View File

@ -1,4 +1,4 @@
uuid: 244db603-ebbf-43c1-ade5-a4ef0bd99d3f
uuid: fb77a05b-0bbc-4bba-aede-59b373ede799
langcode: en
status: true
dependencies: { }

View File

@ -1,4 +1,4 @@
uuid: 05dcb560-2034-4245-bc17-790e74761dc5
uuid: 1e6cd0f1-e949-4fac-b935-b26c09be445d
langcode: en
status: true
dependencies: { }

View File

@ -1,4 +1,4 @@
uuid: d4bdbea8-1cd9-4eef-84b7-943522da4ff9
uuid: fb89ae32-f11e-4845-aaf4-476f3f295105
langcode: en
status: true
dependencies:

View File

@ -12,6 +12,7 @@ dependencies:
- field.storage.node.field_migration
- field.storage.node.field_tags
- field.storage.node.field_thesaurus
- field.storage.node.field_visuel
- field.storage.node.field_workflow
- image.style.medium
- taxonomy.vocabulary.company
@ -99,6 +100,8 @@ display:
description: ''
columns:
views_bulk_operations_bulk_form: views_bulk_operations_bulk_form
field_materiau_images: field_materiau_images
field_visuel: field_materiau_images
nid: title
title: title
edit_node: title
@ -120,6 +123,16 @@ display:
separator: ''
empty_column: false
responsive: ''
field_materiau_images:
align: ''
separator: ''
empty_column: false
responsive: ''
field_visuel:
align: ''
separator: ''
empty_column: false
responsive: ''
nid:
sortable: false
default_sort_order: asc
@ -362,6 +375,70 @@ display:
separator: ', '
field_api_classes: false
plugin_id: field
field_visuel:
id: field_visuel
table: node__field_visuel
field: field_visuel
relationship: none
group_type: group
admin_label: ''
label: Visuel
exclude: false
alter:
alter_text: false
text: ''
make_link: false
path: ''
absolute: false
external: false
replace_spaces: false
path_case: none
trim_whitespace: false
alt: ''
rel: ''
link_class: ''
prefix: ''
suffix: ''
target: ''
nl2br: false
max_length: 0
word_boundary: true
ellipsis: true
more_link: false
more_link_text: ''
more_link_path: ''
strip_tags: false
trim: false
preserve_tags: ''
html: false
element_type: ''
element_class: ''
element_label_type: ''
element_label_class: ''
element_label_colon: true
element_wrapper_type: ''
element_wrapper_class: ''
element_default_classes: true
empty: ''
hide_empty: false
empty_zero: false
hide_alter_empty: true
click_sort_column: target_id
type: image
settings:
image_style: medium
image_link: ''
group_column: ''
group_columns: { }
group_rows: true
delta_limit: 1
delta_offset: 0
delta_reversed: false
delta_first_last: false
multi_type: separator
separator: ', '
field_api_classes: false
plugin_id: field
nid:
id: nid
table: node_field_data
@ -1648,7 +1725,8 @@ display:
empty: { }
relationships: { }
arguments: { }
display_extenders: { }
display_extenders:
views_ef_fieldset: { }
filter_groups:
operator: AND
groups:
@ -1673,6 +1751,7 @@ display:
- 'config:field.storage.node.field_migration'
- 'config:field.storage.node.field_tags'
- 'config:field.storage.node.field_thesaurus'
- 'config:field.storage.node.field_visuel'
- 'config:field.storage.node.field_workflow'
page_1:
display_plugin: page
@ -1877,4 +1956,5 @@ display:
- 'config:field.storage.node.field_migration'
- 'config:field.storage.node.field_tags'
- 'config:field.storage.node.field_thesaurus'
- 'config:field.storage.node.field_visuel'
- 'config:field.storage.node.field_workflow'