Documentation

User
in package
implements UserInterface

Tags
ORM\Entity

(repositoryClass=UserRepository::class)

UniqueEntity

(fields={"username"}, message="There is already an account with this username")

ORM\InheritanceType

("JOINED")

ORM\DiscriminatorColumn

(name = "type" , type="string")

ORM\DiscriminatorMap

({ "user" = "User", "tech" = "Technicien", "revendeur"="Revendeur", "pro"="EspacePro",

})

Interfaces, Classes, Traits and Enums

UserInterface

Table of Contents

$notifications  : mixed
$id  : mixed
$password  : string
$roles  : mixed
$username  : mixed
__construct()  : mixed
__toString()  : mixed
addNotification()  : self
addRole()  : self
eraseCredentials()  : mixed
getId()  : int|null
getNotifications()  : Collection<int, Notification>
getPassword()  : string
getRoles()  : array<string|int, mixed>
getSalt()  : string|null
Returning a salt is only needed, if you are not using a modern hashing algorithm (e.g. bcrypt or sodium) in your security.yaml.
getUsername()  : string
A visual identifier that represents this user.
is()  : bool
isAdmin()  : mixed
removeNotification()  : self
setPassword()  : self
setRoles()  : self
setUsername()  : self
unseenNotifications()  : mixed

Properties

$notifications

protected mixed $notifications
Tags
ORM\OneToMany

(targetEntity=Notification::class, mappedBy="user",cascade={"persist","remove"})

$id

private mixed $id
Tags
ORM\Id
ORM\GeneratedValue
ORM\Column

(type="integer")

$password

private string $password

The hashed password

Tags
ORM\Column

(type="string")

$roles

private mixed $roles = []
Tags
ORM\Column

(type="json")

$username

private mixed $username
Tags
ORM\Column

(type="string", length=180, unique=true)

Methods

__construct()

public __construct() : mixed
Return values
mixed

__toString()

public __toString() : mixed
Return values
mixed

addRole()

public addRole(string $role) : self
Parameters
$role : string
Return values
self

eraseCredentials()

public eraseCredentials() : mixed
Tags
see
UserInterface
Return values
mixed

getId()

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

getPassword()

public getPassword() : string
Tags
see
UserInterface
Return values
string

getRoles()

public getRoles() : array<string|int, mixed>
Tags
see
UserInterface
Return values
array<string|int, mixed>

getSalt()

Returning a salt is only needed, if you are not using a modern hashing algorithm (e.g. bcrypt or sodium) in your security.yaml.

public getSalt() : string|null
Tags
see
UserInterface
Return values
string|null

getUsername()

A visual identifier that represents this user.

public getUsername() : string
Tags
see
UserInterface
Return values
string

is()

public is(string $role) : bool
Parameters
$role : string
Return values
bool

isAdmin()

public isAdmin() : mixed
Return values
mixed

removeNotification()

public removeNotification(Notification $notification) : self
Parameters
$notification : Notification
Return values
self

setPassword()

public setPassword(string $password) : self
Parameters
$password : string
Return values
self

setRoles()

public setRoles(array<string|int, mixed> $roles) : self
Parameters
$roles : array<string|int, mixed>
Return values
self

setUsername()

public setUsername(string $username) : self
Parameters
$username : string
Return values
self

unseenNotifications()

public unseenNotifications() : mixed
Return values
mixed

Search results