src/Entity/Publication.php line 14

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use App\Repository\PublicationRepository;
  4. use Doctrine\DBAL\Types\Types;
  5. use Doctrine\ORM\Mapping as ORM;
  6. use Symfony\Bridge\Doctrine\Validator\Constraints\UniqueEntity;
  7. /**
  8.  * @ORM\Entity(repositoryClass=PublicationRepository::class)
  9.  * @UniqueEntity(fields={"slug"}, message="url déja utilisé")
  10.  */
  11. class Publication
  12. {
  13.     /**
  14.      * @ORM\Id
  15.      * @ORM\GeneratedValue
  16.      * @ORM\Column(type="integer")
  17.      */
  18.     private $id;
  19.     /**
  20.      * @ORM\Column(type="string", length=255)
  21.      */
  22.     private $title;
  23.     /**
  24.      * @ORM\Column(type="string", length=255)
  25.      */
  26.     private $description;
  27.     /**
  28.      * @ORM\Column(type="string", length=255, unique=true)
  29.      */
  30.     private $slug;
  31.     /**
  32.      * @ORM\Column(type="string", length=255, nullable=true)
  33.      */
  34.     private $keywodrs;
  35.     /**
  36.      * @ORM\Column(type="text")
  37.      */
  38.     private $content;
  39.     /**
  40.      * @ORM\Column(type="datetime_immutable")
  41.      */
  42.     private $created_at;
  43.     /**
  44.      * @ORM\Column(type="datetime_immutable", nullable=true)
  45.      */
  46.     private $updated_at;
  47.     /**
  48.      * @ORM\ManyToOne(targetEntity=PublicationImage::class, inversedBy="publications")
  49.      */
  50.     private $publicationImage;
  51.     /**
  52.      * @ORM\Column(type="string", length=190, nullable=true)
  53.      */
  54.     private $bigtitle;
  55.     /**
  56.      * @ORM\Column(type="string", length=150, nullable=true)
  57.      */
  58.     private $breadcrumbs;
  59.     public function getId(): ?int
  60.     {
  61.         return $this->id;
  62.     }
  63.     public function getTitle(): ?string
  64.     {
  65.         return $this->title;
  66.     }
  67.     public function setTitle(string $title): self
  68.     {
  69.         $this->title $title;
  70.         return $this;
  71.     }
  72.     public function getDescription(): ?string
  73.     {
  74.         return $this->description;
  75.     }
  76.     public function setDescription(string $description): self
  77.     {
  78.         $this->description $description;
  79.         return $this;
  80.     }
  81.     public function getSlug(): ?string
  82.     {
  83.         return $this->slug;
  84.     }
  85.     public function setSlug(string $slug): self
  86.     {
  87.         $this->slug $slug;
  88.         return $this;
  89.     }
  90.     public function getKeywodrs(): ?string
  91.     {
  92.         return $this->keywodrs;
  93.     }
  94.     public function setKeywodrs(?string $keywodrs): self
  95.     {
  96.         $this->keywodrs $keywodrs;
  97.         return $this;
  98.     }
  99.     public function getContent(): ?string
  100.     {
  101.         return $this->content;
  102.     }
  103.     public function setContent(string $content): self
  104.     {
  105.         $this->content $content;
  106.         return $this;
  107.     }
  108.     public function getCreatedAt(): ?\DateTimeImmutable
  109.     {
  110.         return $this->created_at;
  111.     }
  112.     public function setCreatedAt(\DateTimeImmutable $created_at): self
  113.     {
  114.         $this->created_at $created_at;
  115.         return $this;
  116.     }
  117.     public function getUpdatedAt(): ?\DateTimeImmutable
  118.     {
  119.         return $this->updated_at;
  120.     }
  121.     public function setUpdatedAt(?\DateTimeImmutable $updated_at): self
  122.     {
  123.         $this->updated_at $updated_at;
  124.         return $this;
  125.     }
  126.     public function getPublicationImage(): ?PublicationImage
  127.     {
  128.         return $this->publicationImage;
  129.     }
  130.     public function setPublicationImage(?PublicationImage $publicationImage): self
  131.     {
  132.         $this->publicationImage $publicationImage;
  133.         return $this;
  134.     }
  135.     public function getBigtitle(): ?string
  136.     {
  137.         return $this->bigtitle;
  138.     }
  139.     public function setBigtitle(?string $bigtitle): self
  140.     {
  141.         $this->bigtitle $bigtitle;
  142.         return $this;
  143.     }
  144.     public function getBreadcrumbs(): ?string
  145.     {
  146.         return $this->breadcrumbs;
  147.     }
  148.     public function setBreadcrumbs(?string $breadcrumbs): self
  149.     {
  150.         $this->breadcrumbs $breadcrumbs;
  151.         return $this;
  152.     }
  153. }