mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-06-12 21:34:25 +00:00
entity listener added to person to capitalize names
This commit is contained in:
parent
af4cf55046
commit
7d8f380050
@ -1775,4 +1775,18 @@ class Person implements HasCenterInterface, TrackCreationInterface, TrackUpdateI
|
|||||||
return $this;
|
return $this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @ORM\PrePersist
|
||||||
|
*/
|
||||||
|
|
||||||
|
public function nameToCaps(): void
|
||||||
|
{
|
||||||
|
$firstNameCaps = ucfirst(strtolower($this->firstName));
|
||||||
|
$this->setFirstName($firstNameCaps);
|
||||||
|
|
||||||
|
$lastNameCaps = strtoupper($this->lastName);
|
||||||
|
$this->setLastName($lastNameCaps);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user