src/Entity/PageDesignContent.php line 15

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use App\Utils\Media;
  4. use DateTimeImmutable;
  5. use Doctrine\Common\Collections\ArrayCollection;
  6. use Doctrine\Common\Collections\Collection;
  7. use Doctrine\ORM\Mapping as ORM;
  8. use Symfony\Component\Validator\Constraints as Assert;
  9. /**
  10.  * @ORM\Entity(repositoryClass="App\Repository\PageDesignContentRepository")
  11.  */
  12. class PageDesignContent extends Media
  13. {
  14.     /**
  15.      * @ORM\Id()
  16.      * @ORM\GeneratedValue()
  17.      * @ORM\Column(type="integer")
  18.      */
  19.     private $id;
  20.     /**
  21.      * @ORM\Column(type="text", nullable=true)
  22.      */
  23.     private $content;
  24.     /**
  25.      * @ORM\ManyToOne(targetEntity="App\Entity\PageDesign", inversedBy="pageDesignContents")
  26.      */
  27.     private $pageDesign;
  28.     /**
  29.      * @ORM\Column(type="integer", nullable=true)
  30.      */
  31.     private $sequence;
  32.     /**
  33.      * @ORM\PostLoad
  34.      */
  35.     public function init()
  36.     {
  37.         $this->type Media::PAGE_DESIGN;
  38.     }
  39.     public function getId(): ?int
  40.     {
  41.         return $this->id;
  42.     }
  43.     /**
  44.      * @return string|null
  45.      */
  46.     public function getContent(): ?string
  47.     {
  48.         return $this->content;
  49.     }
  50.     /**
  51.      * @param string $content
  52.      * @return $this
  53.      */
  54.     public function setContent(string $content): self
  55.     {
  56.         $this->content $content;
  57.         return $this;
  58.     }
  59.     /**
  60.      * @return mixed
  61.      */
  62.     public function getPageDesign()
  63.     {
  64.         return $this->pageDesign;
  65.     }
  66.     /**
  67.      * @param mixed $pageDesign
  68.      */
  69.     public function setPageDesign($pageDesign): void
  70.     {
  71.         $this->pageDesign $pageDesign;
  72.     }
  73.     /**
  74.      * @return mixed
  75.      */
  76.     public function getSequence()
  77.     {
  78.         return $this->sequence;
  79.     }
  80.     /**
  81.      * @param mixed $sequence
  82.      */
  83.     public function setSequence($sequence): void
  84.     {
  85.         $this->sequence $sequence;
  86.     }
  87. }