diff --git a/modules/opencase_entities/src/Entity/OCActor.php b/modules/opencase_entities/src/Entity/OCActor.php index 662b62f..936180c 100644 --- a/modules/opencase_entities/src/Entity/OCActor.php +++ b/modules/opencase_entities/src/Entity/OCActor.php @@ -114,6 +114,12 @@ class OCActor extends RevisionableContentEntityBase implements OCActorInterface $translation->setOwnerId(0); } } + + $name = $this->get('first_name') ->value . ' '; + if ($this->get('middle_names')->value) $name .= $this->get('middle_names')->value . ' '; + $name .= $this->get('last_name')->value; + + $this->setName($name); // If no revision author has been set explicitly, make the oc_actor owner the // revision author.