ref S-0098 become S0098 without score

This commit is contained in:
Bachir Soussi Chiadmi 2021-02-15 15:30:24 +01:00
parent c572503d1a
commit 162950c929
2 changed files with 8 additions and 1 deletions

View File

@ -54,7 +54,7 @@ function computed_field_field_reference_compute($entity_type_manager, $entity, $
while (count($index_parts) < 4) {
array_unshift($index_parts, "0");
}
return $entity->field_famille->value.'-'.implode('', $index_parts);
return $entity->field_famille->value.implode('', $index_parts);
}
// function computed_field_field_reference_materio_display($field, $entity_field_item, $entity_lang = "en", $langcode = "en") {

View File

@ -179,6 +179,13 @@ class D7NodeMateriau extends FieldableEntity {
}
$row->setSourceProperty('field_location', $locations);
// reference
if(!empty($row->getSourceProperty('field_reference_materio'))){
$ref = $row->getSourceProperty('field_reference_materio')[0]['value'];
$ref = str_replace('-','',$ref);
$row->setSourceProperty('field_reference_materio', [["value"=>$ref]]);
}
// workflow
$query = $this->select('workflow_node', 'wn');
$query->fields('wn', ['sid']);