src/Entity/Pages/Contents.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.  * Pages
  14.  *
  15.  * @ORM\Table("pages_contents")
  16.  * @ORM\Entity(repositoryClass="App\Repository\Pages\ContentsRepository")
  17.  * @ORM\HasLifecycleCallbacks()
  18.  * @Vich\Uploadable
  19.  */
  20. class Contents
  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="folder_slug", type="string", length=255, nullable=true)
  52.      */
  53.     private $folderSlug;
  54.     /**
  55.      * @var string
  56.      *
  57.      * @ORM\Column(name="folder_slug2", type="string", length=255, nullable=true)
  58.      */
  59.     private $folderSlug2;
  60.     /**
  61.      * @var string
  62.      *
  63.      * @ORM\Column(name="folder_slug3", type="string", length=255, nullable=true)
  64.      */
  65.     private $folderSlug3;
  66.     /**
  67.      * @var string
  68.      *
  69.      * @ORM\Column(name="title", type="string", length=255, nullable=true)
  70.      */
  71.     private $title;
  72.     /**
  73.      * @var string
  74.      *
  75.      * @ORM\Column(name="tag", type="string", length=255, nullable=true)
  76.      */
  77.     private $tag;
  78.     /**
  79.      * @var string
  80.      *
  81.      * @ORM\Column(name="status", type="string", length=255, nullable=true)
  82.      */
  83.     private $status;
  84.     /**
  85.      * @var string
  86.      *
  87.      * @ORM\Column(name="theme", type="string", length=255, nullable=true)
  88.      */
  89.     private $theme;
  90.     /**
  91.      * @var string
  92.      *
  93.      * @ORM\Column(name="short_title", type="string", length=255, nullable=true)
  94.      */
  95.     private $shortTitle;
  96.     /**
  97.      * @var string
  98.      *
  99.      * @ORM\Column(name="short_description", type="text", nullable=true)
  100.      */
  101.     private $shortDescription;
  102.     /**
  103.      * @var string
  104.      *
  105.      * @ORM\Column(name="description_cover", type="text", nullable=true)
  106.      */
  107.     private $descriptionCover;
  108.     /**
  109.      * @var string
  110.      *
  111.      * @ORM\Column(name="description_content", type="text", nullable=true)
  112.      */
  113.     private $descriptionContent;
  114.     /**
  115.      * @var string
  116.      *
  117.      * @ORM\Column(name="description_content_end", type="text", nullable=true)
  118.      */
  119.     private $descriptionContentEnd;
  120.     /**
  121.      * @var string
  122.      *
  123.      * @ORM\Column(name="title_mitillo_plus", type="text", nullable=true)
  124.      */
  125.     private $titleMirtilloPlus;
  126.     /**
  127.      * @var string
  128.      *
  129.      * @ORM\Column(name="path_mirtillo_plus", type="text", nullable=true)
  130.      */
  131.     private $pathMirtilloPlus;
  132.     /**
  133.      * @var string
  134.      *
  135.      * @ORM\Column(name="description_mirtillo_plus", type="text", nullable=true)
  136.      */
  137.     private $descriptionMirtilloPlus;
  138.     /**
  139.      * @var string
  140.      *
  141.      * @ORM\Column(name="title_button_mirtillo_plus", type="text", nullable=true)
  142.      */
  143.     private $titleButtonMirtilloPlus;
  144.     /**
  145.      * @var string
  146.      *
  147.      * @ORM\Column(name="description_after_cover", type="text", nullable=true)
  148.      */
  149.     private $descriptionAfterContent;
  150.     /**
  151.      * @var \Pages
  152.      *
  153.      * @ORM\ManyToOne(targetEntity="Pages")
  154.      * @ORM\JoinColumns({
  155.      *   @ORM\JoinColumn(name="page_id", referencedColumnName="id", nullable=true)
  156.      * })
  157.      */
  158.     protected $page;
  159.     /**
  160.      * @ORM\PrePersist
  161.      */
  162.     public function setCreatedAtValue(): void
  163.     {
  164.         $this->setCreatedAt(new \DateTime("now"));
  165.         $this->setUpdatedAt(new \DateTime("now"));
  166.         $this->setStatus("brouillon");
  167.     }
  168.     /**
  169.      * @ORM\PreUpdate
  170.      */
  171.     public function setUpdatedAtValue(): void
  172.     {
  173.         $this->setUpdatedAt(new \DateTime("now"));
  174.     }
  175.     public function __toString()
  176.     {
  177.         return (string)$this->title;
  178.     }
  179.     public function getId(): ?int
  180.     {
  181.         return $this->id;
  182.     }
  183.     public function getCreatedAt(): ?\DateTimeInterface
  184.     {
  185.         return $this->createdAt;
  186.     }
  187.     public function setCreatedAt(?\DateTimeInterface $createdAt): self
  188.     {
  189.         $this->createdAt $createdAt;
  190.         return $this;
  191.     }
  192.     public function getUpdatedAt(): ?\DateTimeInterface
  193.     {
  194.         return $this->updatedAt;
  195.     }
  196.     public function setUpdatedAt(?\DateTimeInterface $updatedAt): self
  197.     {
  198.         $this->updatedAt $updatedAt;
  199.         return $this;
  200.     }
  201.     public function getFolderSlug(): ?string
  202.     {
  203.         return $this->folderSlug;
  204.     }
  205.     public function setFolderSlug(?string $folderSlug): self
  206.     {
  207.         $this->folderSlug $folderSlug;
  208.         return $this;
  209.     }
  210.     public function getFolderSlug2(): ?string
  211.     {
  212.         return $this->folderSlug2;
  213.     }
  214.     public function setFolderSlug2(?string $folderSlug2): self
  215.     {
  216.         $this->folderSlug2 $folderSlug2;
  217.         return $this;
  218.     }
  219.     public function getTitle(): ?string
  220.     {
  221.         return $this->title;
  222.     }
  223.     public function setTitle(?string $title): self
  224.     {
  225.         $this->title $title;
  226.         return $this;
  227.     }
  228.     public function getStatus(): ?string
  229.     {
  230.         return $this->status;
  231.     }
  232.     public function setStatus(?string $status): self
  233.     {
  234.         $this->status $status;
  235.         return $this;
  236.     }
  237.     public function getShortTitle(): ?string
  238.     {
  239.         return $this->shortTitle;
  240.     }
  241.     public function setShortTitle(?string $shortTitle): self
  242.     {
  243.         $this->shortTitle $shortTitle;
  244.         return $this;
  245.     }
  246.     public function getShortDescription(): ?string
  247.     {
  248.         return $this->shortDescription;
  249.     }
  250.     public function setShortDescription(?string $shortDescription): self
  251.     {
  252.         $this->shortDescription $shortDescription;
  253.         return $this;
  254.     }
  255.     public function getDescriptionCover(): ?string
  256.     {
  257.         return $this->descriptionCover;
  258.     }
  259.     public function setDescriptionCover(?string $descriptionCover): self
  260.     {
  261.         $this->descriptionCover $descriptionCover;
  262.         return $this;
  263.     }
  264.     public function getDescriptionContent(): ?string
  265.     {
  266.         return $this->descriptionContent;
  267.     }
  268.     public function setDescriptionContent(?string $descriptionContent): self
  269.     {
  270.         $this->descriptionContent $descriptionContent;
  271.         return $this;
  272.     }
  273.     public function getTitleMirtilloPlus(): ?string
  274.     {
  275.         return $this->titleMirtilloPlus;
  276.     }
  277.     public function setTitleMirtilloPlus(?string $titleMirtilloPlus): self
  278.     {
  279.         $this->titleMirtilloPlus $titleMirtilloPlus;
  280.         return $this;
  281.     }
  282.     public function getPathMirtilloPlus(): ?string
  283.     {
  284.         return $this->pathMirtilloPlus;
  285.     }
  286.     public function setPathMirtilloPlus(?string $pathMirtilloPlus): self
  287.     {
  288.         $this->pathMirtilloPlus $pathMirtilloPlus;
  289.         return $this;
  290.     }
  291.     public function getDescriptionAfterContent(): ?string
  292.     {
  293.         return $this->descriptionAfterContent;
  294.     }
  295.     public function setDescriptionAfterContent(?string $descriptionAfterContent): self
  296.     {
  297.         $this->descriptionAfterContent $descriptionAfterContent;
  298.         return $this;
  299.     }
  300.     public function getPage(): ?Pages
  301.     {
  302.         return $this->page;
  303.     }
  304.     public function setPage(?Pages $page): self
  305.     {
  306.         $this->page $page;
  307.         return $this;
  308.     }
  309.     public function getFolderSlug3(): ?string
  310.     {
  311.         return $this->folderSlug3;
  312.     }
  313.     public function setFolderSlug3(?string $folderSlug3): self
  314.     {
  315.         $this->folderSlug3 $folderSlug3;
  316.         return $this;
  317.     }
  318.     public function getDescriptionContentEnd(): ?string
  319.     {
  320.         return $this->descriptionContentEnd;
  321.     }
  322.     public function setDescriptionContentEnd(?string $descriptionContentEnd): self
  323.     {
  324.         $this->descriptionContentEnd $descriptionContentEnd;
  325.         return $this;
  326.     }
  327.     public function getDescriptionMirtilloPlus(): ?string
  328.     {
  329.         return $this->descriptionMirtilloPlus;
  330.     }
  331.     public function setDescriptionMirtilloPlus(?string $descriptionMirtilloPlus): self
  332.     {
  333.         $this->descriptionMirtilloPlus $descriptionMirtilloPlus;
  334.         return $this;
  335.     }
  336.     public function getTitleButtonMirtilloPlus(): ?string
  337.     {
  338.         return $this->titleButtonMirtilloPlus;
  339.     }
  340.     public function setTitleButtonMirtilloPlus(?string $titleButtonMirtilloPlus): self
  341.     {
  342.         $this->titleButtonMirtilloPlus $titleButtonMirtilloPlus;
  343.         return $this;
  344.     }
  345.     public function getTheme(): ?string
  346.     {
  347.         return $this->theme;
  348.     }
  349.     public function setTheme(?string $theme): self
  350.     {
  351.         $this->theme $theme;
  352.         return $this;
  353.     }
  354.     public function getTag(): ?string
  355.     {
  356.         return $this->tag;
  357.     }
  358.     public function setTag(?string $tag): self
  359.     {
  360.         $this->tag $tag;
  361.         return $this;
  362.     }
  363.     public function getLocale(): ?string
  364.     {
  365.         return $this->locale;
  366.     }
  367.     public function setLocale(?string $locale): static
  368.     {
  369.         $this->locale $locale;
  370.         return $this;
  371.     }
  372. }