WIP: Implementation of stuff goes on
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user