src/Entity/About.php line 13

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use App\Repository\AboutRepository;
  4. use Doctrine\Common\Collections\ArrayCollection;
  5. use Doctrine\Common\Collections\Collection;
  6. use Doctrine\ORM\Mapping as ORM;
  7. /**
  8.  * @ORM\Entity(repositoryClass=AboutRepository::class)
  9.  */
  10. class About {
  11.     use \App\Traits\CommonTrt;
  12.     /**
  13.      * @ORM\Id
  14.      * @ORM\GeneratedValue
  15.      * @ORM\Column(type="integer")
  16.      */
  17.     private $id;
  18.     /**
  19.      * @ORM\Column(type="string", length=255)
  20.      */
  21.     private $title;
  22.     /**
  23.      * @ORM\Column(type="text", nullable=true)
  24.      */
  25.     private $content;
  26.     /**
  27.      * @ORM\Column(type="text", nullable=true)
  28.      */
  29.     private $summary;
  30.     /**
  31.      * @ORM\Column(type="string", length=255, nullable=true)
  32.      */
  33.     private $image;
  34.     /**
  35.      * @ORM\Column(type="string", length=255, nullable=true)
  36.      */
  37.     private $bannerImg;
  38.     /**
  39.      * @ORM\Column(type="string", length=255)
  40.      */
  41.     private $slug;
  42.     /**
  43.      * @ORM\Column(type="string", length=255, nullable=true)
  44.      */
  45.     private $urlVideo;
  46.     /**
  47.      * @ORM\Column(type="boolean")
  48.      */
  49.     private $isActive;
  50.     /**
  51.      * @ORM\ManyToOne(targetEntity=Lang::class, inversedBy="abouts")
  52.      */
  53.     private $langue;
  54.     /**
  55.      * @ORM\Column(type="string", length=255, nullable=true)
  56.      */
  57.     private $title2;
  58.     /**
  59.      * @ORM\ManyToMany(targetEntity=Tag::class, inversedBy="abouts")
  60.      */
  61.     private $tag;
  62.     /**
  63.      * @ORM\Column(type="text", nullable=true)
  64.      */
  65.     private $subtiltes;
  66.     /**
  67.      * @ORM\Column(type="string", length=255, nullable=true)
  68.      */
  69.     private $illustration;
  70.     /**
  71.      * @ORM\Column(type="string", length=255, nullable=true)
  72.      */
  73.     private $imgKara;
  74.     /**
  75.      * @ORM\Column(type="string", length=255, nullable=true)
  76.      */
  77.     private $imgSokode;
  78.     /**
  79.      * @ORM\OneToMany(targetEntity=Historiques::class, mappedBy="about")
  80.      */
  81.     private $historiques;
  82.     public function __construct()
  83.     {
  84.         $this->tag = new ArrayCollection();
  85.         $this->historiques = new ArrayCollection();
  86.     }
  87.     public function getId(): ?int {
  88.         return $this->id;
  89.     }
  90.     public function getTitle(): ?string {
  91.         return $this->title;
  92.     }
  93.     public function setTitle(string $title): self {
  94.         $this->title = $title;
  95.         return $this;
  96.     }
  97.     public function getContent(): ?string {
  98.         return $this->content;
  99.     }
  100.     public function setContent(?string $content): self {
  101.         $this->content = $content;
  102.         return $this;
  103.     }
  104.     public function getSummary(): ?string {
  105.         return $this->summary;
  106.     }
  107.     public function setSummary(?string $summary): self {
  108.         $this->summary = $summary;
  109.         return $this;
  110.     }
  111.     public function getImage(): ?string {
  112.         return $this->image;
  113.     }
  114.     public function setImage(?string $image): self {
  115.         $this->image = $image;
  116.         return $this;
  117.     }
  118.     public function getBannerImg(): ?string {
  119.         return $this->bannerImg;
  120.     }
  121.     public function setBannerImg(?string $bannerImg): self {
  122.         $this->bannerImg = $bannerImg;
  123.         return $this;
  124.     }
  125.     public function getSlug(): ?string {
  126.         return $this->slug;
  127.     }
  128.     public function setSlug(string $slug): self {
  129.         $this->slug = $slug;
  130.         return $this;
  131.     }
  132.     public function getUrlVideo(): ?string {
  133.         return $this->urlVideo;
  134.     }
  135.     public function setUrlVideo(?string $urlVideo): self {
  136.         $this->urlVideo = $urlVideo;
  137.         return $this;
  138.     }
  139.     public function isIsActive(): ?bool
  140.     {
  141.         return $this->isActive;
  142.     }
  143.     public function setIsActive(bool $isActive): self
  144.     {
  145.         $this->isActive = $isActive;
  146.         return $this;
  147.     }
  148.     public function getLangue(): ?Lang
  149.     {
  150.         return $this->langue;
  151.     }
  152.     public function setLangue(?Lang $langue): self
  153.     {
  154.         $this->langue = $langue;
  155.         return $this;
  156.     }
  157.     public function getTitle2(): ?string
  158.     {
  159.         return $this->title2;
  160.     }
  161.     public function setTitle2(?string $title2): self
  162.     {
  163.         $this->title2 = $title2;
  164.         return $this;
  165.     }
  166.     /**
  167.      * @return Collection<int, Tag>
  168.      */
  169.     public function getTag(): Collection
  170.     {
  171.         return $this->tag;
  172.     }
  173.     public function addTag(Tag $tag): self
  174.     {
  175.         if (!$this->tag->contains($tag)) {
  176.             $this->tag[] = $tag;
  177.         }
  178.         return $this;
  179.     }
  180.     public function removeTag(Tag $tag): self
  181.     {
  182.         $this->tag->removeElement($tag);
  183.         return $this;
  184.     }
  185.     public function getSubtiltes(): ?string
  186.     {
  187.         return $this->subtiltes;
  188.     }
  189.     public function setSubtiltes(?string $subtiltes): self
  190.     {
  191.         $this->subtiltes = $subtiltes;
  192.         return $this;
  193.     }
  194.     public function getIllustration(): ?string
  195.     {
  196.         return $this->illustration;
  197.     }
  198.     public function setIllustration(?string $illustration): self
  199.     {
  200.         $this->illustration = $illustration;
  201.         return $this;
  202.     }
  203.     public function getImgKara(): ?string
  204.     {
  205.         return $this->imgKara;
  206.     }
  207.     public function setImgKara(?string $imgKara): self
  208.     {
  209.         $this->imgKara = $imgKara;
  210.         return $this;
  211.     }
  212.     public function getImgSokode(): ?string
  213.     {
  214.         return $this->imgSokode;
  215.     }
  216.     public function setImgSokode(?string $imgSokode): self
  217.     {
  218.         $this->imgSokode = $imgSokode;
  219.         return $this;
  220.     }
  221.     /**
  222.      * @return Collection<int, Historiques>
  223.      */
  224.     public function getHistoriques(): Collection
  225.     {
  226.         return $this->historiques;
  227.     }
  228.     public function addHistorique(Historiques $historique): self
  229.     {
  230.         if (!$this->historiques->contains($historique)) {
  231.             $this->historiques[] = $historique;
  232.             $historique->setAbout($this);
  233.         }
  234.         return $this;
  235.     }
  236.     public function removeHistorique(Historiques $historique): self
  237.     {
  238.         if ($this->historiques->removeElement($historique)) {
  239.             // set the owning side to null (unless already changed)
  240.             if ($historique->getAbout() === $this) {
  241.                 $historique->setAbout(null);
  242.             }
  243.         }
  244.         return $this;
  245.     }
  246. }