User
in package
implements
UserInterface, PasswordAuthenticatedUserInterface
Attributes
- #[ApiResource]
- $operations: [new \ApiPlatform\Metadata\Post(uriTemplate: '/users', controller: \App\Controller\Api\CreateUserController::class), new \ApiPlatform\Metadata\Get()]
- $normalizationContext: ['groups' => ['user:read']]
- $denormalizationContext: ['groups' => ['user:write']]
- #[Entity]
- $repositoryClass: \App\Repository\UserRepository::class
- #[UniqueConstraint]
- $name: 'unique_email_per_pos'
- $columns: ['email', 'point_of_sale_id']
- #[UniqueEntity]
- $fields: ['email', 'pointOfSaleId']
- $message: 'Un compte existe déjà avec cet email pour ce point de vente.'
Table of Contents
Interfaces
- UserInterface
- PasswordAuthenticatedUserInterface
Properties
- $adresse : string|null
- $archiveStatus : bool|null
- $carts : Collection
- $created_at : DateTimeImmutable|null
- $email : string|null
- $firstname : string|null
- $histories : Collection
- $historyFunds : Collection
- $historyPurchaseOrders : Collection
- $id : int|null
- $image : string|null
- $inventories : Collection
- $inventoryStocks : Collection
- $isEmailReceived : bool|null
- $isSmsReceived : bool|null
- $lastname : string|null
- $password : string
- $phoneNumber : PhoneNumber|null
- $pointOfSaleId : int|null
- $roles : array<string|int, mixed>
- $sales : Collection
- $sessionSales : Collection
- $updated_at : DateTimeImmutable|null
Methods
- __construct() : mixed
- addCart() : static
- addHistory() : static
- addHistoryFund() : static
- addHistoryPurchaseOrder() : static
- addInventory() : static
- addInventoryStock() : static
- addSale() : static
- addSessionSale() : static
- eraseCredentials() : void
- getAdresse() : string|null
- getCarts() : Collection<int, Cart>
- getCreatedAt() : DateTimeImmutable|null
- getCurrentSession() : SessionSale|null
- getEmail() : string|null
- getFirstname() : string|null
- getFullName() : string
- getHistories() : Collection<int, History>
- getHistoryFunds() : Collection<int, HistoryFund>
- getHistoryPurchaseOrders() : Collection<int, HistoryPurchaseOrder>
- getId() : int|null
- getImage() : string|null
- getInventories() : Collection<int, Inventory>
- getInventoryStocks() : Collection<int, InventoryStock>
- getLastname() : string|null
- getPassword() : string
- getPhoneNumber() : PhoneNumber|null
- getPhoneNumberE164() : string|null
- getPointOfSaleId() : int|null
- getRoles() : array<string|int, mixed>
- getSales() : Collection<int, Sale>
- getSessionSales() : Collection<int, SessionSale>
- getUpdatedAt() : DateTimeImmutable|null
- getUserIdentifier() : string
- A visual identifier that represents this user.
- isArchiveStatus() : bool|null
- isIsEmailReceived() : bool|null
- isIsSmsReceived() : bool|null
- removeCart() : static
- removeHistory() : static
- removeHistoryFund() : static
- removeHistoryPurchaseOrder() : static
- removeInventory() : static
- removeInventoryStock() : static
- removeSale() : static
- removeSessionSale() : static
- setAdresse() : static
- setArchiveStatus() : static
- setCreatedAt() : static
- setEmail() : static
- setFirstname() : static
- setImage() : static
- setIsEmailReceived() : static
- setIsSmsReceived() : static
- setLastname() : static
- setPassword() : static
- setPhoneNumber() : static
- setPointOfSaleId() : static
- setRoles() : static
- setUpdatedAt() : static
Properties
$adresse
private
string|null
$adresse
= null
Attributes
- #[Column]
- $length: 255
- #[Groups]
- ['user:read', 'user:write']
$archiveStatus
private
bool|null
$archiveStatus
= null
Attributes
- #[Column]
- $nullable: true
$carts
private
Collection
$carts
Attributes
- #[OneToMany]
- $mappedBy: 'user'
- $targetEntity: \App\Entity\Cart::class
$created_at
private
DateTimeImmutable|null
$created_at
= null
Attributes
- #[Column]
private
string|null
$email
= null
Attributes
- #[Column]
- $length: 180
- #[Groups]
- ['user:read', 'user:write']
$firstname
private
string|null
$firstname
= null
Attributes
- #[Column]
- $length: 255
- #[Groups]
- ['user:read', 'user:write']
$histories
private
Collection
$histories
Attributes
- #[OneToMany]
- $mappedBy: 'user'
- $targetEntity: \App\Entity\History::class
- $orphanRemoval: true
$historyFunds
private
Collection
$historyFunds
Attributes
- #[OneToMany]
- $mappedBy: 'user'
- $targetEntity: \App\Entity\HistoryFund::class
$historyPurchaseOrders
private
Collection
$historyPurchaseOrders
Attributes
- #[OneToMany]
- $mappedBy: 'user'
- $targetEntity: \App\Entity\HistoryPurchaseOrder::class
$id
private
int|null
$id
= null
Attributes
- #[Column]
- #[GeneratedValue]
- #[Groups]
- ['user:read']
- #[Id]
$image
private
string|null
$image
= null
Attributes
- #[Column]
- $length: 255
- $nullable: true
$inventories
private
Collection
$inventories
Attributes
- #[OneToMany]
- $mappedBy: 'user'
- $targetEntity: \App\Entity\Inventory::class
$inventoryStocks
private
Collection
$inventoryStocks
Attributes
- #[OneToMany]
- $mappedBy: 'user'
- $targetEntity: \App\Entity\InventoryStock::class
$isEmailReceived
private
bool|null
$isEmailReceived
= null
Attributes
- #[Column]
- $nullable: true
$isSmsReceived
private
bool|null
$isSmsReceived
= null
Attributes
- #[Column]
- $nullable: true
$lastname
private
string|null
$lastname
= null
Attributes
- #[Column]
- $length: 255
- #[Groups]
- ['user:read', 'user:write']
$password
private
string
$password
= null
The hashed password
Attributes
- #[Column]
- #[Groups]
- ['user:write']
$phoneNumber
private
PhoneNumber|null
$phoneNumber
= null
Attributes
- #[Column]
- $type: 'phone_number'
- $length: 35
- $nullable: true
- #[Groups]
- ['user:read', 'user:write']
- #[PhoneNumber]
- $message: 'Le numéro de téléphone est invalide.'
$pointOfSaleId
private
int|null
$pointOfSaleId
= null
Attributes
- #[Column]
- #[Groups]
- ['user:read', 'user:write']
$roles
private
array<string|int, mixed>
$roles
= []
Attributes
- #[Column]
- #[Groups]
- ['user:read', 'user:write']
$sales
private
Collection
$sales
Attributes
- #[OneToMany]
- $mappedBy: 'user'
- $targetEntity: \App\Entity\Sale::class
$sessionSales
private
Collection
$sessionSales
Attributes
- #[OneToMany]
- $mappedBy: 'user'
- $targetEntity: \App\Entity\SessionSale::class
$updated_at
private
DateTimeImmutable|null
$updated_at
= null
Attributes
- #[Column]
Methods
__construct()
public
__construct() : mixed
addCart()
public
addCart(Cart $cart) : static
Parameters
- $cart : Cart
Return values
staticaddHistory()
public
addHistory(History $history) : static
Parameters
- $history : History
Return values
staticaddHistoryFund()
public
addHistoryFund(HistoryFund $historyFund) : static
Parameters
- $historyFund : HistoryFund
Return values
staticaddHistoryPurchaseOrder()
public
addHistoryPurchaseOrder(HistoryPurchaseOrder $historyPurchaseOrder) : static
Parameters
- $historyPurchaseOrder : HistoryPurchaseOrder
Return values
staticaddInventory()
public
addInventory(Inventory $inventory) : static
Parameters
- $inventory : Inventory
Return values
staticaddInventoryStock()
public
addInventoryStock(InventoryStock $inventoryStock) : static
Parameters
- $inventoryStock : InventoryStock
Return values
staticaddSale()
public
addSale(Sale $sale) : static
Parameters
- $sale : Sale
Return values
staticaddSessionSale()
public
addSessionSale(SessionSale $sessionSale) : static
Parameters
- $sessionSale : SessionSale
Return values
staticeraseCredentials()
public
eraseCredentials() : void
Tags
getAdresse()
public
getAdresse() : string|null
Return values
string|nullgetCarts()
public
getCarts() : Collection<int, Cart>
Return values
Collection<int, Cart>getCreatedAt()
public
getCreatedAt() : DateTimeImmutable|null
Return values
DateTimeImmutable|nullgetCurrentSession()
public
getCurrentSession() : SessionSale|null
Return values
SessionSale|nullgetEmail()
public
getEmail() : string|null
Return values
string|nullgetFirstname()
public
getFirstname() : string|null
Return values
string|nullgetFullName()
public
getFullName() : string
Return values
stringgetHistories()
public
getHistories() : Collection<int, History>
Return values
Collection<int, History>getHistoryFunds()
public
getHistoryFunds() : Collection<int, HistoryFund>
Return values
Collection<int, HistoryFund>getHistoryPurchaseOrders()
public
getHistoryPurchaseOrders() : Collection<int, HistoryPurchaseOrder>
Return values
Collection<int, HistoryPurchaseOrder>getId()
public
getId() : int|null
Return values
int|nullgetImage()
public
getImage() : string|null
Return values
string|nullgetInventories()
public
getInventories() : Collection<int, Inventory>
Return values
Collection<int, Inventory>getInventoryStocks()
public
getInventoryStocks() : Collection<int, InventoryStock>
Return values
Collection<int, InventoryStock>getLastname()
public
getLastname() : string|null
Return values
string|nullgetPassword()
public
getPassword() : string
Tags
Return values
stringgetPhoneNumber()
public
getPhoneNumber() : PhoneNumber|null
Return values
PhoneNumber|nullgetPhoneNumberE164()
public
getPhoneNumberE164() : string|null
Return values
string|nullgetPointOfSaleId()
public
getPointOfSaleId() : int|null
Return values
int|nullgetRoles()
public
getRoles() : array<string|int, mixed>
Tags
Return values
array<string|int, mixed>getSales()
public
getSales() : Collection<int, Sale>
Return values
Collection<int, Sale>getSessionSales()
public
getSessionSales() : Collection<int, SessionSale>
Return values
Collection<int, SessionSale>getUpdatedAt()
public
getUpdatedAt() : DateTimeImmutable|null
Return values
DateTimeImmutable|nullgetUserIdentifier()
A visual identifier that represents this user.
public
getUserIdentifier() : string
Tags
Return values
stringisArchiveStatus()
public
isArchiveStatus() : bool|null
Return values
bool|nullisIsEmailReceived()
public
isIsEmailReceived() : bool|null
Return values
bool|nullisIsSmsReceived()
public
isIsSmsReceived() : bool|null
Return values
bool|nullremoveCart()
public
removeCart(Cart $cart) : static
Parameters
- $cart : Cart
Return values
staticremoveHistory()
public
removeHistory(History $history) : static
Parameters
- $history : History
Return values
staticremoveHistoryFund()
public
removeHistoryFund(HistoryFund $historyFund) : static
Parameters
- $historyFund : HistoryFund
Return values
staticremoveHistoryPurchaseOrder()
public
removeHistoryPurchaseOrder(HistoryPurchaseOrder $historyPurchaseOrder) : static
Parameters
- $historyPurchaseOrder : HistoryPurchaseOrder
Return values
staticremoveInventory()
public
removeInventory(Inventory $inventory) : static
Parameters
- $inventory : Inventory
Return values
staticremoveInventoryStock()
public
removeInventoryStock(InventoryStock $inventoryStock) : static
Parameters
- $inventoryStock : InventoryStock
Return values
staticremoveSale()
public
removeSale(Sale $sale) : static
Parameters
- $sale : Sale
Return values
staticremoveSessionSale()
public
removeSessionSale(SessionSale $sessionSale) : static
Parameters
- $sessionSale : SessionSale
Return values
staticsetAdresse()
public
setAdresse(string $adresse) : static
Parameters
- $adresse : string
Return values
staticsetArchiveStatus()
public
setArchiveStatus(bool|null $archiveStatus) : static
Parameters
- $archiveStatus : bool|null
Return values
staticsetCreatedAt()
public
setCreatedAt(DateTimeImmutable $created_at) : static
Parameters
- $created_at : DateTimeImmutable
Return values
staticsetEmail()
public
setEmail(string $email) : static
Parameters
- $email : string
Return values
staticsetFirstname()
public
setFirstname(string $firstname) : static
Parameters
- $firstname : string
Return values
staticsetImage()
public
setImage(string $image) : static
Parameters
- $image : string
Return values
staticsetIsEmailReceived()
public
setIsEmailReceived(bool|null $isEmailReceived) : static
Parameters
- $isEmailReceived : bool|null
Return values
staticsetIsSmsReceived()
public
setIsSmsReceived(bool|null $isSmsReceived) : static
Parameters
- $isSmsReceived : bool|null
Return values
staticsetLastname()
public
setLastname(string $lastname) : static
Parameters
- $lastname : string
Return values
staticsetPassword()
public
setPassword(string $password) : static
Parameters
- $password : string
Return values
staticsetPhoneNumber()
public
setPhoneNumber(PhoneNumber|null $phoneNumber) : static
Parameters
- $phoneNumber : PhoneNumber|null
Return values
staticsetPointOfSaleId()
public
setPointOfSaleId(int $pointOfSaleId) : static
Parameters
- $pointOfSaleId : int
Return values
staticsetRoles()
public
setRoles(array<string|int, mixed> $roles) : static
Parameters
- $roles : array<string|int, mixed>
Return values
staticsetUpdatedAt()
public
setUpdatedAt(DateTimeImmutable $updated_at) : static
Parameters
- $updated_at : DateTimeImmutable