<?php
namespace App\Entity;
use App\Repository\CategoriesActualitesRepository;
use Doctrine\Common\Collections\ArrayCollection;
use Doctrine\Common\Collections\Collection;
use Doctrine\ORM\Mapping as ORM;
/**
* @ORM\Entity(repositoryClass=CategoriesActualitesRepository::class)
*/
class CategoriesActualites
{
/**
* @ORM\Id
* @ORM\GeneratedValue
* @ORM\Column(type="integer")
*/
private $id;
/**
* @ORM\Column(type="string", length=255, nullable=true)
*/
private $TitreFr;
/**
* @ORM\Column(type="string", length=255, nullable=true)
*/
private $TitreEn;
/**
* @ORM\OneToMany(targetEntity=Actualites::class, mappedBy="CategoriesActualites")
*/
private $actualites;
public function __toString(){
return $this->TitreFr;
}
public function __construct()
{
$this->actualites = new ArrayCollection();
}
public function getId(): ?int
{
return $this->id;
}
public function getTitreFr(): ?string
{
return $this->TitreFr;
}
public function setTitreFr(?string $TitreFr): self
{
$this->TitreFr = $TitreFr;
return $this;
}
public function getTitreEn(): ?string
{
return $this->TitreEn;
}
public function setTitreEn(?string $TitreEn): self
{
$this->TitreEn = $TitreEn;
return $this;
}
/**
* @return Collection<int, Actualites>
*/
public function getActualites(): Collection
{
return $this->actualites;
}
public function addActualite(Actualites $actualite): self
{
if (!$this->actualites->contains($actualite)) {
$this->actualites[] = $actualite;
$actualite->setCategoriesActualites($this);
}
return $this;
}
public function removeActualite(Actualites $actualite): self
{
if ($this->actualites->removeElement($actualite)) {
// set the owning side to null (unless already changed)
if ($actualite->getCategoriesActualites() === $this) {
$actualite->setCategoriesActualites(null);
}
}
return $this;
}
}