src/Entity/Banners.php line 9

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use App\Repository\BannersRepository;
  4. use Doctrine\ORM\Mapping as ORM;
  5. #[ORM\Entity(repositoryClassBannersRepository::class)]
  6. class Banners
  7. {
  8.     #[ORM\Id]
  9.     #[ORM\GeneratedValue]
  10.     #[ORM\Column(type'integer')]
  11.     private $id;
  12.     #[ORM\ManyToOne(targetEntityPages::class, inversedBy'banners')]
  13.     private $page;
  14.     #[ORM\Column(type'string'length255)]
  15.     private $name;
  16.     #[ORM\Column(type'string'length255nullabletrue)]
  17.     private $alt;
  18.     #[ORM\Column(type'datetime')]
  19.     private $modified;
  20.     #[ORM\Column(type'datetime')]
  21.     private $created;
  22.     #[ORM\Column(type'boolean')]
  23.     private $isPublished;
  24.     #[ORM\Column(type'boolean')]
  25.     private $isDefault;
  26.     #[ORM\Column(type'integer')]
  27.     private $orderBy;
  28.     #[ORM\Column(type'text'nullabletrue)]
  29.     private $caption;
  30.     public function __construct()
  31.     {
  32.         $this->setModified(new \DateTime());
  33.         if ($this->getCreated() == null) {
  34.             $this->setCreated(new \DateTime());
  35.         }
  36.     }
  37.     public function getId(): ?int
  38.     {
  39.         return $this->id;
  40.     }
  41.     public function getPage(): ?Pages
  42.     {
  43.         return $this->page;
  44.     }
  45.     public function setPage(?Pages $page): self
  46.     {
  47.         $this->page $page;
  48.         return $this;
  49.     }
  50.     public function getName(): ?string
  51.     {
  52.         return $this->name;
  53.     }
  54.     public function setName(string $name): self
  55.     {
  56.         $this->name $name;
  57.         return $this;
  58.     }
  59.     public function getAlt(): ?string
  60.     {
  61.         return $this->alt;
  62.     }
  63.     public function setAlt(?string $alt): self
  64.     {
  65.         $this->alt $alt;
  66.         return $this;
  67.     }
  68.     public function getModified(): ?\DateTimeInterface
  69.     {
  70.         return $this->modified;
  71.     }
  72.     public function setModified(\DateTimeInterface $modified): self
  73.     {
  74.         $this->modified $modified;
  75.         return $this;
  76.     }
  77.     public function getCreated(): ?\DateTimeInterface
  78.     {
  79.         return $this->created;
  80.     }
  81.     public function setCreated(\DateTimeInterface $created): self
  82.     {
  83.         $this->created $created;
  84.         return $this;
  85.     }
  86.     public function isIsPublished(): ?bool
  87.     {
  88.         return $this->isPublished;
  89.     }
  90.     public function setIsPublished(bool $isPublished): self
  91.     {
  92.         $this->isPublished $isPublished;
  93.         return $this;
  94.     }
  95.     public function getIsDefault(): ?bool
  96.     {
  97.         return $this->isDefault;
  98.     }
  99.     public function setIsDefault(bool $isDefault): self
  100.     {
  101.         $this->isDefault $isDefault;
  102.         return $this;
  103.     }
  104.     public function getOrderBy(): ?int
  105.     {
  106.         return $this->orderBy;
  107.     }
  108.     public function setOrderBy(int $orderBy): self
  109.     {
  110.         $this->orderBy $orderBy;
  111.         return $this;
  112.     }
  113.     public function getCaption(): ?string
  114.     {
  115.         return $this->caption;
  116.     }
  117.     public function setCaption(?string $caption): self
  118.     {
  119.         $this->caption $caption;
  120.         return $this;
  121.     }
  122. }