src/Entity/AboutPage.php line 16

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use App\Repository\AboutPageRepository;
  4. use Doctrine\DBAL\Types\Types;
  5. use Doctrine\ORM\Mapping as ORM;
  6. use Symfony\Component\Validator\Constraints as Assert;
  7. //use Symfony\Bridge\Doctrine\Validator\Constraints as DoctrineAssert;
  8. use Gedmo\Mapping\Annotation as Gedmo;
  9. /**
  10.  * @ORM\Entity(repositoryClass=AboutPageRepository::class)
  11.  * @ORM\Table(name="about_page")
  12.  */
  13. class AboutPage
  14. {
  15.     /**
  16.     * @ORM\Id
  17.     * @ORM\Column(type="integer")
  18.     * @ORM\GeneratedValue(strategy="AUTO")
  19.     */
  20.     protected $id;
  21.     /**
  22.     * @var string $name
  23.     *
  24.     * @ORM\Column(type="string", nullable=true)
  25.     */
  26.     protected $name;
  27.     /**
  28.     * @var string $banner_desk
  29.     *
  30.     * @ORM\ManyToOne(targetEntity="App\Entity\SonataMediaMedia", cascade = {"persist"})
  31.     * @ORM\JoinColumn(name="banner_desk_id", referencedColumnName="id", onDelete="SET NULL")
  32.     */
  33.     protected $banner_desk;
  34.     /**
  35.     * @var string $banner_mobile
  36.     *
  37.     * @ORM\ManyToOne(targetEntity="App\Entity\SonataMediaMedia", cascade = {"persist"})
  38.     * @ORM\JoinColumn(name="banner_mobile_id", referencedColumnName="id", onDelete="SET NULL")
  39.     */
  40.     protected $banner_mobile;
  41.     /**
  42.     * @var string $hero_text
  43.     *
  44.     * @ORM\Column(type="text", nullable=true)
  45.     */
  46.     protected $hero_text;
  47.     /**
  48.     * @var string $hero_image
  49.     *
  50.     * @ORM\ManyToOne(targetEntity="App\Entity\SonataMediaMedia", cascade = {"persist"})
  51.     * @ORM\JoinColumn(name="hero_image_id", referencedColumnName="id", onDelete="SET NULL")
  52.     */
  53.     protected $hero_image;
  54.     /**
  55.     * @var string $block_1
  56.     *
  57.     * @ORM\Column(type="text", nullable=true)
  58.     */
  59.     protected $block_1;
  60.     /**
  61.     * @var string $block_1_image
  62.     *
  63.     * @ORM\ManyToOne(targetEntity="App\Entity\SonataMediaMedia", cascade = {"persist"})
  64.     * @ORM\JoinColumn(name="block_1_image_id", referencedColumnName="id", onDelete="SET NULL")
  65.     */
  66.     protected $block_1_image;
  67.     /**
  68.     * @var string $block_2
  69.     *
  70.     * @ORM\Column(type="text", nullable=true)
  71.     */
  72.     protected $block_2;
  73.     /**
  74.     * @var string $block_2_image
  75.     *
  76.     * @ORM\ManyToOne(targetEntity="App\Entity\SonataMediaMedia", cascade = {"persist"})
  77.     * @ORM\JoinColumn(name="block_2_image_id", referencedColumnName="id", onDelete="SET NULL")
  78.     */
  79.     protected $block_2_image;
  80.     /**
  81.     * @var string $block_3
  82.     *
  83.     * @ORM\Column(type="text", nullable=true)
  84.     */
  85.     protected $block_3;
  86.     /**
  87.     * @var string $block_3_image
  88.     *
  89.     * @ORM\ManyToOne(targetEntity="App\Entity\SonataMediaMedia", cascade = {"persist"})
  90.     * @ORM\JoinColumn(name="block_3_image_id", referencedColumnName="id", onDelete="SET NULL")
  91.     */
  92.     protected $block_3_image;
  93.     /**
  94.     * @var \App\Entity\Seo $seo
  95.     *
  96.     * @ORM\ManyToOne(targetEntity="App\Entity\Seo", inversedBy="about_page")
  97.     * @ORM\JoinColumn(name="seo_id", referencedColumnName="id")
  98.     */
  99.     private $seo;
  100.     /**
  101.     * @var string $create_at
  102.     *
  103.     * @Gedmo\Timestampable(on="create")
  104.     * @ORM\Column(type="datetime", nullable=true)
  105.     */
  106.     protected $create_at;
  107.     /**
  108.     * @var string $update_at
  109.     *
  110.     * @Gedmo\Timestampable(on="update")
  111.     * @ORM\Column(type="datetime", nullable=true)
  112.     */
  113.     protected $update_at;
  114.     public function __toString(): string
  115.     {
  116.         return $this->name ?? '';
  117.     }
  118.     public function getId(): ?int
  119.     {
  120.         return $this->id;
  121.     }
  122.     public function getName(): ?string
  123.     {
  124.         return $this->name;
  125.     }
  126.     public function setName(?string $name): static
  127.     {
  128.         $this->name $name;
  129.         return $this;
  130.     }
  131.     public function getHeroText(): ?string
  132.     {
  133.         return $this->hero_text;
  134.     }
  135.     public function setHeroText(?string $hero_text): static
  136.     {
  137.         $this->hero_text $hero_text;
  138.         return $this;
  139.     }
  140.     public function getCreateAt(): ?\DateTimeInterface
  141.     {
  142.         return $this->create_at;
  143.     }
  144.     public function setCreateAt(?\DateTimeInterface $create_at): static
  145.     {
  146.         $this->create_at $create_at;
  147.         return $this;
  148.     }
  149.     public function getUpdateAt(): ?\DateTimeInterface
  150.     {
  151.         return $this->update_at;
  152.     }
  153.     public function setUpdateAt(?\DateTimeInterface $update_at): static
  154.     {
  155.         $this->update_at $update_at;
  156.         return $this;
  157.     }
  158.     public function getBannerDesk(): ?SonataMediaMedia
  159.     {
  160.         return $this->banner_desk;
  161.     }
  162.     public function setBannerDesk(?SonataMediaMedia $banner_desk): static
  163.     {
  164.         $this->banner_desk $banner_desk;
  165.         return $this;
  166.     }
  167.     public function getBannerMobile(): ?SonataMediaMedia
  168.     {
  169.         return $this->banner_mobile;
  170.     }
  171.     public function setBannerMobile(?SonataMediaMedia $banner_mobile): static
  172.     {
  173.         $this->banner_mobile $banner_mobile;
  174.         return $this;
  175.     }
  176.     public function getHeroImage(): ?SonataMediaMedia
  177.     {
  178.         return $this->hero_image;
  179.     }
  180.     public function setHeroImage(?SonataMediaMedia $hero_image): static
  181.     {
  182.         $this->hero_image $hero_image;
  183.         return $this;
  184.     }
  185.     public function getSeo(): ?Seo
  186.     {
  187.         return $this->seo;
  188.     }
  189.     public function setSeo(?Seo $seo): static
  190.     {
  191.         $this->seo $seo;
  192.         return $this;
  193.     }
  194.     public function getBlock1(): ?string
  195.     {
  196.         return $this->block_1;
  197.     }
  198.     public function setBlock1(?string $block_1): static
  199.     {
  200.         $this->block_1 $block_1;
  201.         return $this;
  202.     }
  203.     public function getBlock2(): ?string
  204.     {
  205.         return $this->block_2;
  206.     }
  207.     public function setBlock2(?string $block_2): static
  208.     {
  209.         $this->block_2 $block_2;
  210.         return $this;
  211.     }
  212.     public function getBlock3(): ?string
  213.     {
  214.         return $this->block_3;
  215.     }
  216.     public function setBlock3(?string $block_3): static
  217.     {
  218.         $this->block_3 $block_3;
  219.         return $this;
  220.     }
  221.     public function getBlock1Image(): ?SonataMediaMedia
  222.     {
  223.         return $this->block_1_image;
  224.     }
  225.     public function setBlock1Image(?SonataMediaMedia $block_1_image): static
  226.     {
  227.         $this->block_1_image $block_1_image;
  228.         return $this;
  229.     }
  230.     public function getBlock2Image(): ?SonataMediaMedia
  231.     {
  232.         return $this->block_2_image;
  233.     }
  234.     public function setBlock2Image(?SonataMediaMedia $block_2_image): static
  235.     {
  236.         $this->block_2_image $block_2_image;
  237.         return $this;
  238.     }
  239.     public function getBlock3Image(): ?SonataMediaMedia
  240.     {
  241.         return $this->block_3_image;
  242.     }
  243.     public function setBlock3Image(?SonataMediaMedia $block_3_image): static
  244.     {
  245.         $this->block_3_image $block_3_image;
  246.         return $this;
  247.     }
  248. }