WIP: Implementation of stuff goes on

This commit is contained in:
Björn Fromme
2023-10-05 12:53:17 +02:00
parent 96d6170907
commit 1097b84447
23 changed files with 443 additions and 118 deletions
+44
View File
@@ -27,6 +27,12 @@ class User implements UserInterface, TimestampableEntityInterface
#[ORM\Column]
private ?int $busProPersonId = null;
#[ORM\Column(length: 255)]
private ?string $firstName = null;
#[ORM\Column(length: 255)]
private ?string $lastName = null;
#[ORM\Column(length: 255)]
private ?string $email = null;
@@ -44,6 +50,11 @@ class User implements UserInterface, TimestampableEntityInterface
$this->uuid = Uuid::v4();
}
public function __toString()
{
return $this->getFullName();
}
public function getId(): ?int
{
return $this->id;
@@ -78,6 +89,39 @@ class User implements UserInterface, TimestampableEntityInterface
return $this;
}
public function getFirstName(): ?string
{
return $this->firstName;
}
public function setFirstName(?string $firstName): static
{
$this->firstName = $firstName;
return $this;
}
public function getLastName(): ?string
{
return $this->lastName;
}
public function setLastName(?string $lastName): static
{
$this->lastName = $lastName;
return $this;
}
public function getFullName(bool $formal = false): string
{
if (true === $formal) {
return sprintf('%s, %s', $this->getLastName(), $this->getFirstName());
}
return sprintf('%s %s', $this->getFirstName(), $this->getLastName());
}
public function getEmail(): ?string
{
return $this->email;