migration materiau:thesaurus,tags,manufacturer,distributors,video; better admin node view
This commit is contained in:
@@ -46,12 +46,29 @@ process:
|
||||
4: "workflow_imported"
|
||||
5: "workflow_edited"
|
||||
|
||||
# field_thesaurus: field_onthologie
|
||||
# field_tags: field_tags_libres
|
||||
field_thesaurus:
|
||||
plugin: migration_lookup
|
||||
migration: d7_taxonomy_term_thesaurus
|
||||
source: field_onthologie
|
||||
field_tags:
|
||||
plugin: migration_lookup
|
||||
migration: d7_taxonomy_term_tags
|
||||
source: field_tags_libres
|
||||
field_manufacturer:
|
||||
plugin: migration_lookup
|
||||
migration: d7_taxonomy_term_company
|
||||
source: field_company_fab
|
||||
field_distributor:
|
||||
plugin: migration_lookup
|
||||
migration: d7_taxonomy_term_company
|
||||
source: field_company_distrib
|
||||
field_video:
|
||||
plugin: iterator
|
||||
source: field_video_filter
|
||||
process:
|
||||
value: url
|
||||
|
||||
# field_materiau_images: field_materiau_image
|
||||
# field_video: field_video_filter
|
||||
# field_manufacturer: field_company_fab
|
||||
# field_distributor: field_company_distrib
|
||||
# field_attachments: field_attachments
|
||||
# field_linked_materials: field_materiau_ref
|
||||
# field_linked_breves: field_breve_ref
|
||||
|
@@ -109,8 +109,8 @@ class D7NodeMateriau extends FieldableEntity {
|
||||
$nid = $row->getSourceProperty('nid');
|
||||
$vid = $row->getSourceProperty('vid');
|
||||
$type = $row->getSourceProperty('type');
|
||||
|
||||
drush_print('-- '.$language."\t".$nid);
|
||||
$title = $row->getSourceProperty('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.
|
||||
@@ -119,8 +119,6 @@ class D7NodeMateriau extends FieldableEntity {
|
||||
$entity_translatable = $this->isEntityTranslatable('node') && (int) $this->variableGet('language_content_type_' . $type, 0) === 4;
|
||||
$language = $entity_translatable ? $this->getEntityTranslationSourceLanguage('node', $nid) : $row->getSourceProperty('language');
|
||||
|
||||
|
||||
|
||||
// Get Field API field values.
|
||||
foreach ($this->getFields('node', $type) as $field_name => $field) {
|
||||
// Ensure we're using the right language if the entity and the field are
|
||||
@@ -128,6 +126,9 @@ class D7NodeMateriau extends FieldableEntity {
|
||||
$field_language = $entity_translatable && $field['translatable'] ? $language : NULL;
|
||||
$row->setSourceProperty($field_name, $this->getFieldValues('node', $field_name, $nid, $vid, $field_language));
|
||||
}
|
||||
if(!empty($row->getSourceProperty('field_video_filter'))){
|
||||
print_r($row->getSourceProperty('field_video_filter'));
|
||||
}
|
||||
|
||||
// Make sure we always have a translation set.
|
||||
if ($row->getSourceProperty('tnid') == 0) {
|
||||
|
Reference in New Issue
Block a user