migration node materiau: field_index, field_reference

This commit is contained in:
2018-12-17 17:31:28 +01:00
parent 86792830fb
commit b8f572a83e
5 changed files with 25 additions and 19 deletions

View File

@@ -2,6 +2,11 @@
function computed_field_field_index_compute($entity_type_manager, $entity, $fields, $delta){
// drush_print($entity->field_index->value);
if (!empty($entity->field_index->value)) { // the node is not new
return $entity->field_index->value;
}
/* FROM D7
@@ -61,6 +66,9 @@ function computed_field_field_index_compute($entity_type_manager, $entity, $fiel
// }
function computed_field_field_reference_compute($entity_type_manager, $entity, $fields, $delta) {
if (!empty($entity->field_reference->value)) { // the node is not new
return $entity->field_reference->value;
}
/* FROM D7