BCard - Documentation technique

BusinessCardAize
in package

Carte de visite numérique (carte virtuelle) d'un utilisateur ou d'un employé.

Malgré son nom, cette entité porte l'ensemble des informations affichées sur une carte de visite BCard : identité, coordonnées, réseaux sociaux, image, logo, couleurs, numéros de téléphone multiples (phoneNumbers, au format JSON, chacun avec sa visibilité propre) et activités professionnelles liées (Activity). Elle appartient à un User (many-to-one, propriétaire optionnel) et peut référencer un Card du catalogue de cartes physiques/NFC (many-to-one) ainsi qu'un Employee (one-to-one, quand la carte est celle d'un salarié d'entreprise plutôt que celle d'un utilisateur individuel).

Le statut (status) suit trois valeurs constantes — STATUS_DRAFT, STATUS_PUBLISHED, STATUS_DISABLED — et est manipulé via publish(), setAsDraft() et disable(). Le logo personnalisé et les couleurs personnalisées ne sont effectivement affichés (getDisplayLogo()) que si l'utilisateur associé a accès aux fonctionnalités premium (User::hasAccessToPremiumFeatures()) : canUseCustomLogo() et canUseCustomColors() encapsulent cette règle.

getPhoneNumbers() retombe sur le champ historique phoneNumber si phoneNumbers est vide, pour compatibilité avec les cartes créées avant l'introduction des numéros multiples ; getVisiblePhoneNumbers() n'en retourne que les numéros marqués visibles.

Groupes de sérialisation exposés à l'API : businessCard:read (la quasi-totalité des champs, y compris emailSentAt) et businessCard:write (les mêmes, hors emailSentAt). country n'appartient à aucun des deux groupes et n'est donc pas exposé par le sérialiseur API.

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

Table of Contents

Constants

STATUS_DISABLED  : mixed = 'disabled'
STATUS_DRAFT  : mixed = 'draft'
STATUS_PUBLISHED  : mixed = 'published'

Properties

$activities  : Collection<int, Activity>
$additionalInfo  : string|null
$address  : string|null
$bio  : string|null
$card  : Card|null
$company  : string|null
$country  : string|null
$createdAt  : DateTimeImmutable|null
$customLogo  : string|null
$cv  : string|null
$email  : string|null
$emailSentAt  : DateTimeImmutable|null
$employee  : Employee|null
$facebook  : string|null
$firstName  : string|null
$id  : int|null
$image  : string|null
$industry  : string|null
$instagram  : string|null
$jobTitle  : string|null
$lastName  : string|null
$linkedin  : string|null
$organizationType  : string|null
$phoneNumber  : string|null
$phoneNumbers  : array<string|int, mixed>|null
$primaryColor  : string|null
$publicHash  : string|null
$qrCodePath  : string|null
$secondaryColor  : string|null
$shareInNetwork  : bool
$skills  : array<string|int, mixed>|null
$status  : string
$twitter  : string|null
$user  : User|null
$website  : string|null

Methods

__construct()  : mixed
addActivity()  : static
canUseCustomColors()  : bool
Vérifie si l'utilisateur peut utiliser des couleurs personnalisées (offre Pro)
canUseCustomLogo()  : bool
Vérifie si l'utilisateur peut utiliser un logo personnalisé (offre Pro)
disable()  : static
getActivities()  : Collection<int, Activity>
getAdditionalInfo()  : string|null
getAddress()  : string|null
getBio()  : string|null
getCard()  : Card|null
getCompany()  : string|null
getCountry()  : string|null
getCreatedAt()  : DateTimeImmutable|null
getCustomLogo()  : string|null
getCv()  : string|null
getDisplayLogo()  : string|null
Retourne le logo à afficher (personnalisé si disponible, sinon logo par défaut)
getEmail()  : string|null
getEmailSentAt()  : DateTimeImmutable|null
getEmployee()  : Employee|null
getFacebook()  : string|null
getFirstName()  : string|null
getId()  : int|null
getImage()  : string|null
getIndustry()  : string|null
getInstagram()  : string|null
getJobTitle()  : string|null
getLastName()  : string|null
getLinkedin()  : string|null
getOrganizationType()  : string|null
getPhoneNumber()  : string|null
getPhoneNumbers()  : array<string|int, mixed>
getPrimaryColor()  : string|null
getPublicHash()  : string|null
getQrCodePath()  : string|null
getSecondaryColor()  : string|null
getSkills()  : array<string|int, mixed>
getStatus()  : string
getTwitter()  : string|null
getUser()  : User|null
getVisiblePhoneNumbers()  : array<string|int, mixed>
getWebsite()  : string|null
isDisabled()  : bool
isDraft()  : bool
isPublished()  : bool
isShareInNetwork()  : bool
markEmailAsSent()  : static
publish()  : static
removeActivity()  : static
setAdditionalInfo()  : static
setAddress()  : static
setAsDraft()  : static
setBio()  : static
setCard()  : static
setCompany()  : static
setCountry()  : static
setCreatedAt()  : static
setCustomLogo()  : static
setCv()  : static
setEmail()  : static
setEmailSentAt()  : static
setEmployee()  : static
setFacebook()  : static
setFirstName()  : static
setImage()  : static
setIndustry()  : static
setInstagram()  : static
setJobTitle()  : static
setLastName()  : static
setLinkedin()  : static
setOrganizationType()  : static
setPhoneNumber()  : static
setPhoneNumbers()  : static
setPrimaryColor()  : static
setPublicHash()  : static
setQrCodePath()  : static
setSecondaryColor()  : static
setShareInNetwork()  : static
setSkills()  : static
setStatus()  : static
setTwitter()  : static
setUser()  : static
setWebsite()  : static
normalizePhoneNumbers()  : array<string|int, mixed>

Constants

Properties

$activities

private Collection<int, Activity> $activities
Attributes
#[OneToMany]
$targetEntity: \App\Entity\Activity::class
$mappedBy: 'businessCardAize'
$cascade: ['persist', 'remove']
$orphanRemoval: true

$additionalInfo

private string|null $additionalInfo = null
Attributes
#[Column]
$length: 255
$nullable: true
#[Groups]
['businessCard:read', 'businessCard:write']

$address

private string|null $address = null
Attributes
#[Column]
$length: 255
$nullable: true
#[Groups]
['businessCard:read', 'businessCard:write']

$bio

private string|null $bio = null
Attributes
#[Column]
$length: 255
$nullable: true
#[Groups]
['businessCard:read', 'businessCard:write']

$card

private Card|null $card = null
Attributes
#[ManyToOne]
$inversedBy: 'businessCardAizes'

$company

private string|null $company = null
Attributes
#[Column]
$length: 255
$nullable: true
#[Groups]
['businessCard:read', 'businessCard:write']

$country

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

$createdAt

private DateTimeImmutable|null $createdAt = null
Attributes
#[Column]
$nullable: true
#[Groups]
['businessCard:read', 'businessCard:write']
private string|null $customLogo = null
Attributes
#[Column]
$length: 255
$nullable: true
#[Groups]
['businessCard:read', 'businessCard:write']

$cv

private string|null $cv = null
Attributes
#[Column]
$length: 255
$nullable: true
#[Groups]
['businessCard:read', 'businessCard:write']

$email

private string|null $email = null
Attributes
#[Column]
$length: 255
#[Groups]
['businessCard:read', 'businessCard:write']

$emailSentAt

private DateTimeImmutable|null $emailSentAt = null
Attributes
#[Column]
$nullable: true
#[Groups]
['businessCard:read']

$employee

private Employee|null $employee = null
Attributes
#[JoinColumn]
$nullable: true
#[OneToOne]
$inversedBy: 'businessCard'

$facebook

private string|null $facebook = null
Attributes
#[Column]
$length: 255
$nullable: true
#[Groups]
['businessCard:read', 'businessCard:write']

$firstName

private string|null $firstName = null
Attributes
#[Column]
$length: 255
#[Groups]
['businessCard:read', 'businessCard:write']

$id

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

$image

private string|null $image = null
Attributes
#[Column]
$length: 255
$nullable: true
#[Groups]
['businessCard:read', 'businessCard:write']

$industry

private string|null $industry = null
Attributes
#[Column]
$length: 255
$nullable: true
#[Groups]
['businessCard:read', 'businessCard:write']

$instagram

private string|null $instagram = null
Attributes
#[Column]
$length: 255
$nullable: true
#[Groups]
['businessCard:read', 'businessCard:write']

$jobTitle

private string|null $jobTitle = null
Attributes
#[Column]
$length: 255
$nullable: true
#[Groups]
['businessCard:read', 'businessCard:write']

$lastName

private string|null $lastName = null
Attributes
#[Column]
$length: 255
#[Groups]
['businessCard:read', 'businessCard:write']

$linkedin

private string|null $linkedin = null
Attributes
#[Column]
$length: 255
$nullable: true
#[Groups]
['businessCard:read', 'businessCard:write']

$organizationType

private string|null $organizationType = null
Attributes
#[Column]
$length: 255
$nullable: true
#[Groups]
['businessCard:read', 'businessCard:write']

$phoneNumber

private string|null $phoneNumber = null
Attributes
#[Column]
$length: 255
#[Groups]
['businessCard:read', 'businessCard:write']

$phoneNumbers

private array<string|int, mixed>|null $phoneNumbers = []
Attributes
#[Column]
$type: \Doctrine\DBAL\Types\Types::JSON
$nullable: true
#[Groups]
['businessCard:read', 'businessCard:write']

$primaryColor

private string|null $primaryColor = null
Attributes
#[Column]
$length: 7
$nullable: true
#[Groups]
['businessCard:read', 'businessCard:write']

$publicHash

private string|null $publicHash = null
Attributes
#[Column]
$name: 'public_hash'
$length: 64
$unique: true
$nullable: true

$qrCodePath

private string|null $qrCodePath = null
Attributes
#[Column]
$length: 255
$nullable: true
#[Groups]
['businessCard:read', 'businessCard:write']

$secondaryColor

private string|null $secondaryColor = null
Attributes
#[Column]
$length: 7
$nullable: true
#[Groups]
['businessCard:read', 'businessCard:write']

$shareInNetwork

private bool $shareInNetwork = true
Attributes
#[Column]
$options: ['default' => true]

$skills

private array<string|int, mixed>|null $skills = []
Attributes
#[Column]
$type: \Doctrine\DBAL\Types\Types::JSON
$nullable: true
#[Groups]
['businessCard:read', 'businessCard:write']

$status

private string $status = 'draft'
Attributes
#[Column]
$length: 20
$options: ['default' => 'draft']
#[Groups]
['businessCard:read', 'businessCard:write']

$twitter

private string|null $twitter = null
Attributes
#[Column]
$length: 255
$nullable: true
#[Groups]
['businessCard:read', 'businessCard:write']

$user

private User|null $user = null
Attributes
#[ManyToOne]
$inversedBy: 'businessCardAizes'

$website

private string|null $website = null
Attributes
#[Column]
$length: 255
$nullable: true
#[Groups]
['businessCard:read', 'businessCard:write']

Methods

canUseCustomColors()

Vérifie si l'utilisateur peut utiliser des couleurs personnalisées (offre Pro)

public canUseCustomColors() : bool
Return values
bool

Vérifie si l'utilisateur peut utiliser un logo personnalisé (offre Pro)

public canUseCustomLogo() : bool
Return values
bool

getAdditionalInfo()

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

getAddress()

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

getCompany()

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

getCountry()

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

getCreatedAt()

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

Retourne le logo à afficher (personnalisé si disponible, sinon logo par défaut)

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

getEmailSentAt()

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

getFacebook()

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

getFirstName()

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

getIndustry()

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

getInstagram()

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

getJobTitle()

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

getLastName()

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

getLinkedin()

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

getOrganizationType()

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

getPhoneNumber()

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

getPhoneNumbers()

public getPhoneNumbers() : array<string|int, mixed>
Return values
array<string|int, mixed>

getPrimaryColor()

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

getPublicHash()

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

getQrCodePath()

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

getSecondaryColor()

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

getSkills()

public getSkills() : array<string|int, mixed>
Return values
array<string|int, mixed>

getTwitter()

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

getVisiblePhoneNumbers()

public getVisiblePhoneNumbers() : array<string|int, mixed>
Return values
array<string|int, mixed>

getWebsite()

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

markEmailAsSent()

public markEmailAsSent() : static
Return values
static

setAdditionalInfo()

public setAdditionalInfo(string|null $additionalInfo) : static
Parameters
$additionalInfo : string|null
Return values
static

setAddress()

public setAddress(string|null $address) : static
Parameters
$address : string|null
Return values
static

setBio()

public setBio(string|null $bio) : static
Parameters
$bio : string|null
Return values
static

setCompany()

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

setCountry()

public setCountry(string|null $country) : static
Parameters
$country : string|null
Return values
static

setCreatedAt()

public setCreatedAt(DateTimeImmutable $createdAt) : static
Parameters
$createdAt : DateTimeImmutable
Return values
static
public setCustomLogo(string|null $customLogo) : static
Parameters
$customLogo : string|null
Return values
static

setCv()

public setCv(string|null $cv) : static
Parameters
$cv : string|null
Return values
static

setEmail()

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

setEmailSentAt()

public setEmailSentAt(DateTimeImmutable|null $emailSentAt) : static
Parameters
$emailSentAt : DateTimeImmutable|null
Return values
static

setFacebook()

public setFacebook(string|null $facebook) : static
Parameters
$facebook : string|null
Return values
static

setFirstName()

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

setImage()

public setImage(string|null $image) : static
Parameters
$image : string|null
Return values
static

setIndustry()

public setIndustry(string|null $industry) : static
Parameters
$industry : string|null
Return values
static

setInstagram()

public setInstagram(string|null $instagram) : static
Parameters
$instagram : string|null
Return values
static

setJobTitle()

public setJobTitle(string|null $jobTitle) : static
Parameters
$jobTitle : string|null
Return values
static

setLastName()

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

setLinkedin()

public setLinkedin(string|null $linkedin) : static
Parameters
$linkedin : string|null
Return values
static

setOrganizationType()

public setOrganizationType(string|null $organizationType) : static
Parameters
$organizationType : string|null
Return values
static

setPhoneNumber()

public setPhoneNumber(string $phoneNumber) : static
Parameters
$phoneNumber : string
Return values
static

setPhoneNumbers()

public setPhoneNumbers(array<string|int, mixed>|null $phoneNumbers) : static
Parameters
$phoneNumbers : array<string|int, mixed>|null
Return values
static

setPrimaryColor()

public setPrimaryColor(string|null $primaryColor) : static
Parameters
$primaryColor : string|null
Return values
static

setPublicHash()

public setPublicHash(string|null $publicHash) : static
Parameters
$publicHash : string|null
Return values
static

setQrCodePath()

public setQrCodePath(string $qrCodePath) : static
Parameters
$qrCodePath : string
Return values
static

setSecondaryColor()

public setSecondaryColor(string|null $secondaryColor) : static
Parameters
$secondaryColor : string|null
Return values
static

setShareInNetwork()

public setShareInNetwork(bool $shareInNetwork) : static
Parameters
$shareInNetwork : bool
Return values
static

setSkills()

public setSkills(array<string|int, mixed>|null $skills) : static
Parameters
$skills : array<string|int, mixed>|null
Return values
static

setStatus()

public setStatus(string $status) : static
Parameters
$status : string
Return values
static

setTwitter()

public setTwitter(string|null $twitter) : static
Parameters
$twitter : string|null
Return values
static

setWebsite()

public setWebsite(string|null $website) : static
Parameters
$website : string|null
Return values
static

normalizePhoneNumbers()

private normalizePhoneNumbers(array<string|int, mixed> $phoneNumbers) : array<string|int, mixed>
Parameters
$phoneNumbers : array<string|int, mixed>
Return values
array<string|int, mixed>

        
On this page

Search results