migration node materiau: field_index, field_reference
This commit is contained in:
@@ -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
|
||||
|
||||
|
Reference in New Issue
Block a user