BCard - Documentation technique

Employee
in package

Salarié d'une entreprise cliente, pouvant recevoir sa propre carte de visite virtuelle.

Un employé appartient à une entreprise unique Company (jointure obligatoire) et porte au plus une carte de visite virtuelle BusinessCardAize (relation OneToOne inverse, avec cascade persist/remove : supprimer l'employé supprime sa carte). L'unicité de email et de phone est contrôlée à la fois en base (UNIQ_IDENTIFIER_EMAIL) et au niveau applicatif (#[UniqueEntity]). getFullName() est un champ dérivé qui concatène firstName et lastName, sans être persisté. isActive (par défaut true) permet de désactiver un employé sans le supprimer.

Attributes
#[Entity]
$repositoryClass: \App\Repository\EmployeeRepository::class
#[UniqueConstraint]
$name: 'UNIQ_IDENTIFIER_EMAIL'
$fields: ['email', 'phone']
#[UniqueEntity]
$fields: ['email']
$message: 'Un employé existe dejà avec cet email'
#[UniqueEntity]
$fields: ['phone']
$message: 'Un employé existe dejà avec cet numéro de téléphone'

Table of Contents

Properties

$businessCard  : BusinessCardAize|null
$company  : Company|null
$createdAt  : DateTimeImmutable|null
$cvPath  : string|null
$department  : string|null
$email  : string|null
$firstName  : string|null
$id  : int|null
$isActive  : bool
$lastName  : string|null
$phone  : string|null
$position  : string|null

Methods

__construct()  : mixed
getBusinessCard()  : BusinessCardAize|null
getCompany()  : Company|null
getCreatedAt()  : DateTimeImmutable|null
getCvPath()  : string|null
getDepartment()  : string|null
getEmail()  : string|null
getFirstName()  : string|null
getFullName()  : string
getId()  : int|null
getLastName()  : string|null
getPhone()  : string|null
getPosition()  : string|null
isActive()  : bool
setActive()  : static
setBusinessCard()  : static
setCompany()  : static
setCreatedAt()  : static
setCvPath()  : static
setDepartment()  : static
setEmail()  : static
setFirstName()  : static
setLastName()  : static
setPhone()  : static
setPosition()  : static

Properties

$businessCard

private BusinessCardAize|null $businessCard = null
Attributes
#[OneToOne]
$mappedBy: 'employee'
$cascade: ['persist', 'remove']

$company

private Company|null $company = null
Attributes
#[JoinColumn]
$nullable: false
#[ManyToOne]
$inversedBy: 'employees'

$createdAt

private DateTimeImmutable|null $createdAt
Attributes
#[Column]

$cvPath

private string|null $cvPath = null
Attributes
#[Column]
$length: 255
$nullable: true

$department

private string|null $department = null
Attributes
#[Column]
$length: 100
$nullable: true

$email

private string|null $email = null
Attributes
#[Column]
$length: 180
#[Email]
$message: 'Veuillez entrer un email valide'
#[NotBlank]
$message: 'L\'email est obligatoire'

$firstName

private string|null $firstName = null
Attributes
#[Column]
$length: 100
#[Length]
$min: 2
$max: 100
#[NotBlank]
$message: 'Le prénom est obligatoire'

$id

private int|null $id = null
Attributes
#[Column]
#[GeneratedValue]
#[Id]

$isActive

private bool $isActive = true
Attributes
#[Column]

$lastName

private string|null $lastName = null
Attributes
#[Column]
$length: 100
#[Length]
$min: 2
$max: 100
#[NotBlank]
$message: 'Le nom est obligatoire'

$phone

private string|null $phone = null
Attributes
#[Column]
$length: 20
$nullable: true

$position

private string|null $position = null
Attributes
#[Column]
$length: 100
$nullable: true

Methods

__construct()

public __construct() : mixed

getCreatedAt()

public getCreatedAt() : DateTimeImmutable|null
Return values
DateTimeImmutable|null

getCvPath()

public getCvPath() : string|null
Return values
string|null

getDepartment()

public getDepartment() : string|null
Return values
string|null

getEmail()

public getEmail() : string|null
Return values
string|null

getFirstName()

public getFirstName() : string|null
Return values
string|null

getFullName()

public getFullName() : string
Return values
string

getId()

public getId() : int|null
Return values
int|null

getLastName()

public getLastName() : string|null
Return values
string|null

getPhone()

public getPhone() : string|null
Return values
string|null

getPosition()

public getPosition() : string|null
Return values
string|null

isActive()

public isActive() : bool
Return values
bool

setActive()

public setActive(bool $isActive) : static
Parameters
$isActive : bool
Return values
static

setCompany()

public setCompany(Company|null $company) : static
Parameters
$company : Company|null
Return values
static

setCreatedAt()

public setCreatedAt(DateTimeImmutable $createdAt) : static
Parameters
$createdAt : DateTimeImmutable
Return values
static

setCvPath()

public setCvPath(string|null $cvPath) : static
Parameters
$cvPath : string|null
Return values
static

setDepartment()

public setDepartment(string|null $department) : static
Parameters
$department : string|null
Return values
static

setEmail()

public setEmail(string $email) : static
Parameters
$email : string
Return values
static

setFirstName()

public setFirstName(string $firstName) : static
Parameters
$firstName : string
Return values
static

setLastName()

public setLastName(string $lastName) : static
Parameters
$lastName : string
Return values
static

setPhone()

public setPhone(string|null $phone) : static
Parameters
$phone : string|null
Return values
static

setPosition()

public setPosition(string|null $position) : static
Parameters
$position : string|null
Return values
static

        
On this page

Search results