Actor name field is now set to full name on save

This commit is contained in:
naomi 2018-04-29 14:50:41 +02:00
parent 76f61b16b7
commit 900ba263c7

View File

@ -115,6 +115,12 @@ class OCActor extends RevisionableContentEntityBase implements OCActorInterface
} }
} }
$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 // If no revision author has been set explicitly, make the oc_actor owner the
// revision author. // revision author.
if (!$this->getRevisionUser()) { if (!$this->getRevisionUser()) {