Categorie
in package
Entité représentant une catégorie
Attributes
- #[Entity]
- $repositoryClass: \App\Repository\CategorieRepository::class
Table of Contents
Properties
- $formations : Collection<int, Formation>
- Les formations contenues dans la catégorie
- $id : int|null
- L'identifiant de la catégorie
- $name : string|null
- Le nom de la catégorie
Methods
- __construct() : mixed
- Constructeur de l'entité
- addFormation() : $this
- Ajoute une formation aux formations de la catégorie
- getFormations() : Collection<int, Formation>
- getId() : int|null
- getName() : string|null
- removeFormation() : $this
- Supprime une formation des formations de la catégorie
- setName() : static
Properties
$formations
Les formations contenues dans la catégorie
private
Collection<int, Formation>
$formations
Attributes
- #[ManyToMany]
- $targetEntity: \App\Entity\Formation::class
- $mappedBy: 'categories'
$id
L'identifiant de la catégorie
private
int|null
$id
= null
Attributes
- #[Column]
- #[GeneratedValue]
- #[Id]
$name
Le nom de la catégorie
private
string|null
$name
= null
Attributes
- #[Column]
- $length: 50
- $nullable: true
Methods
__construct()
Constructeur de l'entité
public
__construct() : mixed
addFormation()
Ajoute une formation aux formations de la catégorie
public
addFormation(Formation $formation) : $this
Parameters
- $formation : Formation
-
La formation à ajouter
Return values
$thisgetFormations()
public
getFormations() : Collection<int, Formation>
Return values
Collection<int, Formation>getId()
public
getId() : int|null
Return values
int|nullgetName()
public
getName() : string|null
Return values
string|nullremoveFormation()
Supprime une formation des formations de la catégorie
public
removeFormation(Formation $formation) : $this
Parameters
- $formation : Formation
-
La formation à supprimer
Return values
$thissetName()
public
setName(string|null $name) : static
Parameters
- $name : string|null