<?php
namespace App\Entity\Actualites;
use Doctrine\Common\Collections\ArrayCollection;
use Doctrine\Common\Collections\Collection;
use Doctrine\ORM\Mapping as ORM;
/**
* ActualitesCat
*
* @ORM\Table(name="actualites_cat", indexes={@ORM\Index(name="actif", columns={"actif"}), @ORM\Index(name="langue", columns={"langue"})})
* @ORM\Entity(repositoryClass="App\Repository\Actualites\ActualitesCatRepository")
*/
class ActualitesCat
{
/**
* @var int
*
* @ORM\Column(name="id", type="integer", nullable=false)
* @ORM\Id
* @ORM\GeneratedValue(strategy="IDENTITY")
*/
private $id;
/**
* @var string
*
* @ORM\Column(name="titre_url", type="string", length=255, nullable=false)
*/
private $titreUrl = '';
/**
* @var string
*
* @ORM\Column(name="titre", type="string", length=255, nullable=false)
*/
private $titre = '';
/**
* @var string
*
* @ORM\Column(name="texte", type="text", length=65535, nullable=false)
*/
private $texte = '';
/**
* @var int
*
* @ORM\Column(name="ordre", type="integer", nullable=false, options={"default":0})
*/
private $ordre = 0;
/**
* @var bool
*
* @ORM\Column(name="actif", type="boolean", nullable=false, options={"default":0})
*/
private $actif = 0;
/**
* @var string
*
* @ORM\Column(name="langue", type="string", length=3, nullable=false)
*/
private $langue = '';
/**
* @var int
*
* @ORM\Column(name="largeur_grand", type="integer", nullable=false, options={"default":0})
*/
private $largeurGrand = 0;
/**
* @var int
*
* @ORM\Column(name="largeur_petit", type="integer", nullable=false, options={"default":0})
*/
private $largeurPetit = 0;
/**
* @ORM\OneToMany(targetEntity="App\Entity\Actualites\Actualites", mappedBy="idCat1")
*/
private $actualites;
public function __construct()
{
$this->actualites = new ArrayCollection();
}
public function __toString()
{
return $this->getTitre();
}
public function getId(): ?int
{
return $this->id;
}
public function getTitreUrl(): ?string
{
return $this->titreUrl;
}
public function setTitreUrl(string $titreUrl): self
{
$this->titreUrl = $titreUrl;
return $this;
}
public function getTitre(): ?string
{
return $this->titre;
}
public function setTitre(string $titre): self
{
$this->titre = $titre;
return $this;
}
public function getTexte(): ?string
{
return $this->texte;
}
public function setTexte(string $texte): self
{
$this->texte = $texte;
return $this;
}
public function getOrdre(): ?int
{
return $this->ordre;
}
public function setOrdre(int $ordre): self
{
$this->ordre = $ordre;
return $this;
}
public function getActif(): ?bool
{
return $this->actif;
}
public function setActif(bool $actif): self
{
$this->actif = $actif;
return $this;
}
public function getLangue(): ?string
{
return $this->langue;
}
public function setLangue(string $langue): self
{
$this->langue = $langue;
return $this;
}
public function getLargeurGrand(): ?int
{
return $this->largeurGrand;
}
public function setLargeurGrand(int $largeurGrand): self
{
$this->largeurGrand = $largeurGrand;
return $this;
}
public function getLargeurPetit(): ?int
{
return $this->largeurPetit;
}
public function setLargeurPetit(int $largeurPetit): self
{
$this->largeurPetit = $largeurPetit;
return $this;
}
/**
* @return Collection|Actualites[]
*/
public function getActualites(): Collection
{
return $this->actualites;
}
public function addActualite(Actualites $actualite): self
{
if (!$this->actualites->contains($actualite)) {
$this->actualites[] = $actualite;
$actualite->setIdCat1($this);
}
return $this;
}
public function removeActualite(Actualites $actualite): self
{
if ($this->actualites->contains($actualite)) {
$this->actualites->removeElement($actualite);
// set the owning side to null (unless already changed)
if ($actualite->getIdCat1() === $this) {
$actualite->setIdCat1(null);
}
}
return $this;
}
}