mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-06-07 18:44:08 +00:00
minor fixes
This commit is contained in:
parent
0c4ea81550
commit
72d67624a2
@ -1775,26 +1775,4 @@ class Person implements HasCenterInterface, TrackCreationInterface, TrackUpdateI
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* @ORM\PrePersist
|
||||
*/
|
||||
|
||||
public function nameToCaps(): void
|
||||
{
|
||||
$firstNameCaps = ucfirst(strtolower($this->firstName));
|
||||
$this->setFirstName($firstNameCaps);
|
||||
|
||||
$altNamesCaps = [];
|
||||
foreach($this->altNames as $altName)
|
||||
{
|
||||
$altNamesCaps[] = ucfirst(strtolower($altName));
|
||||
}
|
||||
|
||||
$this->setAltNames($altNamesCaps);
|
||||
|
||||
$lastNameCaps = strtoupper($this->lastName);
|
||||
$this->setLastName($lastNameCaps);
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -4,9 +4,9 @@ services:
|
||||
tags:
|
||||
-
|
||||
name: 'doctrine.orm.entity_listener'
|
||||
event: 'prePersist'
|
||||
event: 'onPrePersist'
|
||||
entity: 'Chill\PersonBundle\Entity\Person'
|
||||
-
|
||||
name: 'doctrine.orm.entity_listener'
|
||||
event: 'prePersist'
|
||||
event: 'onPrePersist'
|
||||
entity: 'Chill\PersonBundle\Entity\PersonAltName'
|
Loading…
x
Reference in New Issue
Block a user