add personal and work phone
This commit is contained in:
parent
f9608bce18
commit
980affbfbb
@ -92,6 +92,12 @@ class User implements UserInterface, PasswordAuthenticatedUserInterface
|
||||
#[ORM\Column(type: Types::DATETIME_MUTABLE)]
|
||||
private ?\DateTimeInterface $passwordChanged = null;
|
||||
|
||||
#[ORM\Column(length: 15, nullable: true)]
|
||||
private ?string $personalPhone = null;
|
||||
|
||||
#[ORM\Column(length: 15)]
|
||||
private ?string $workPhone = null;
|
||||
|
||||
public function __construct()
|
||||
{
|
||||
$this->userCases = new ArrayCollection();
|
||||
@ -399,4 +405,38 @@ class User implements UserInterface, PasswordAuthenticatedUserInterface
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function getPersonalPhone(): ?string
|
||||
{
|
||||
return $this->personalPhone;
|
||||
}
|
||||
|
||||
public function setPersonalPhone(?string $personalPhone): static
|
||||
{
|
||||
$this->personalPhone = $personalPhone;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function getWorkPhone(): ?string
|
||||
{
|
||||
return $this->workPhone;
|
||||
}
|
||||
|
||||
public function setWorkPhone(string $workPhone): static
|
||||
{
|
||||
$this->workPhone = $workPhone;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function getFormattedPhone(): ?string
|
||||
{
|
||||
$ret = '';
|
||||
if ($this->workPhone) {
|
||||
$ret = '(' . substr($this->workPhone, 0, 3) . ') ' . substr($this->workPhone, 3, 3) . '-' . substr($this->workPhone, 6);
|
||||
}
|
||||
|
||||
return $ret;
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user