src/Entity/Pages/SecureContent.php line 23

Open in your IDE?
  1. <?php
  2. namespace App\Entity\Pages;
  3. use App\Entity\Fiches\Articles;
  4. use Doctrine\DBAL\Types\Types;
  5. use Symfony\Bridge\Doctrine\Validator\Constraints\UniqueEntity;
  6. use Symfony\Component\Validator\Constraints as Assert;
  7. use Doctrine\ORM\Mapping as ORM;
  8. use Vich\UploaderBundle\Mapping\Annotation as Vich;
  9. use Symfony\Component\HttpFoundation\File\File;
  10. use Symfony\Component\HttpFoundation\File\UploadedFile;
  11. use Vich\UploaderBundle\Entity\File as EmbeddedFile;
  12. /**
  13.  * Secure Content
  14.  *
  15.  * @ORM\Table("pages_secure_content")
  16.  * @ORM\Entity(repositoryClass="App\Repository\Pages\SecureContentRepository")
  17.  * @ORM\HasLifecycleCallbacks()
  18.  * @Vich\Uploadable
  19.  */
  20. class SecureContent
  21. {
  22.     /**
  23.      * @var integer
  24.      *
  25.      * @ORM\Column(name="id", type="integer")
  26.      * @ORM\Id
  27.      * @ORM\GeneratedValue(strategy="AUTO")
  28.      */
  29.     protected $id;
  30.     /**
  31.      * @var string
  32.      *
  33.      * @ORM\Column(name="created_at", type="datetime", nullable=true, options={"comment":"Date de création"})
  34.      */
  35.     private $createdAt;
  36.     /**
  37.      * @var string
  38.      *
  39.      * @ORM\Column(name="updated_at", type="datetime", nullable=true, options={"comment":"Date de mise à jour"})
  40.      */
  41.     private $updatedAt;
  42.     /**
  43.      * @var string
  44.      *
  45.      * @ORM\Column(name="locale", type="string", length=255, nullable=true)
  46.      */
  47.     private $locale;
  48.     /**
  49.      * @var string
  50.      *
  51.      * @ORM\Column(name="identifiant", type="text", nullable=true)
  52.      */
  53.     private $identifiant;
  54.     /**
  55.      * @var string
  56.      *
  57.      * @ORM\Column(name="identifiant_key", type="text", nullable=true)
  58.      */
  59.     private $identifiantKey;
  60.     /**
  61.      * @var string
  62.      *
  63.      * @ORM\Column(name="title", type="string", length=255, nullable=true)
  64.      */
  65.     private $title;
  66.     /**
  67.      * @var string
  68.      *
  69.      * @ORM\Column(name="description", type="text", nullable=true)
  70.      */
  71.     private $description;
  72.     /**
  73.      * @var string
  74.      *
  75.      * @ORM\Column(name="description_content", type="text", nullable=true)
  76.      */
  77.     private $descriptionContent;
  78.     /**
  79.      * @var string
  80.      *
  81.      * @ORM\Column(name="views", type="integer", length=11, nullable=true)
  82.      */
  83.     private $views;
  84.     /**
  85.      * @ORM\PrePersist
  86.      */
  87.     public function setCreatedAtValue(): void
  88.     {
  89.         $this->setCreatedAt(new \DateTime("now"));
  90.         $this->setUpdatedAt(new \DateTime("now"));
  91.     }
  92.     /**
  93.      * @ORM\PreUpdate
  94.      */
  95.     public function setUpdatedAtValue(): void
  96.     {
  97.         $this->setUpdatedAt(new \DateTime("now"));
  98.     }
  99.     public function __toString()
  100.     {
  101.         return (string)$this->identifiant;
  102.     }
  103.     public function getId(): ?int
  104.     {
  105.         return $this->id;
  106.     }
  107.     public function getCreatedAt(): ?\DateTimeInterface
  108.     {
  109.         return $this->createdAt;
  110.     }
  111.     public function setCreatedAt(?\DateTimeInterface $createdAt): static
  112.     {
  113.         $this->createdAt $createdAt;
  114.         return $this;
  115.     }
  116.     public function getUpdatedAt(): ?\DateTimeInterface
  117.     {
  118.         return $this->updatedAt;
  119.     }
  120.     public function setUpdatedAt(?\DateTimeInterface $updatedAt): static
  121.     {
  122.         $this->updatedAt $updatedAt;
  123.         return $this;
  124.     }
  125.     public function getIdentifiant(): ?string
  126.     {
  127.         return $this->identifiant;
  128.     }
  129.     public function setIdentifiant(?string $identifiant): static
  130.     {
  131.         $this->identifiant $identifiant;
  132.         return $this;
  133.     }
  134.     public function getIdentifiantKey(): ?string
  135.     {
  136.         return $this->identifiantKey;
  137.     }
  138.     public function setIdentifiantKey(?string $identifiantKey): static
  139.     {
  140.         $this->identifiantKey $identifiantKey;
  141.         return $this;
  142.     }
  143.     public function getTitle(): ?string
  144.     {
  145.         return $this->title;
  146.     }
  147.     public function setTitle(?string $title): static
  148.     {
  149.         $this->title $title;
  150.         return $this;
  151.     }
  152.     public function getDescription(): ?string
  153.     {
  154.         return $this->description;
  155.     }
  156.     public function setDescription(?string $description): static
  157.     {
  158.         $this->description $description;
  159.         return $this;
  160.     }
  161.     public function getDescriptionContent(): ?string
  162.     {
  163.         return $this->descriptionContent;
  164.     }
  165.     public function setDescriptionContent(?string $descriptionContent): static
  166.     {
  167.         $this->descriptionContent $descriptionContent;
  168.         return $this;
  169.     }
  170.     public function getViews(): ?int
  171.     {
  172.         return $this->views;
  173.     }
  174.     public function setViews(?int $views): static
  175.     {
  176.         $this->views $views;
  177.         return $this;
  178.     }
  179.     public function getLocale(): ?string
  180.     {
  181.         return $this->locale;
  182.     }
  183.     public function setLocale(?string $locale): static
  184.     {
  185.         $this->locale $locale;
  186.         return $this;
  187.     }
  188. }