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

@ -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.