src/Entity/LandingpageElement.php line 14

  1. <?php
  2. namespace App\Entity;
  3. use ApiPlatform\Metadata\ApiResource;
  4. use App\Repository\LandingpageElementRepository;
  5. use Doctrine\DBAL\Types\Types;
  6. use Doctrine\ORM\Mapping as ORM;
  7. use Symfony\UX\Turbo\Attribute\Broadcast;
  8. #[ORM\Entity(repositoryClassLandingpageElementRepository::class)]
  9. #[ApiResource]
  10. #[Broadcast]
  11. class LandingpageElement
  12. {
  13.     #[ORM\Id]
  14.     #[ORM\GeneratedValue]
  15.     #[ORM\Column]
  16.     private ?int $id null;
  17.     #[ORM\Column(typeTypes::TEXT)]
  18.     private ?string $content null;
  19.     #[ORM\ManyToOne(inversedBy'landingpageElements')]
  20.     private ?MediaObject $image null;
  21.     #[ORM\Column(length255)]
  22.     private ?string $type null;
  23.     #[ORM\Column]
  24.     private ?bool $configurator null;
  25.     #[ORM\ManyToOne(inversedBy'landingpageElements')]
  26.     private ?Landingpage $landingpage null;
  27.     public function getId(): ?int
  28.     {
  29.         return $this->id;
  30.     }
  31.     public function getContent(): ?string
  32.     {
  33.         return $this->content;
  34.     }
  35.     public function setContent(string $content): self
  36.     {
  37.         $this->content $content;
  38.         return $this;
  39.     }
  40.     public function getImage(): ?MediaObject
  41.     {
  42.         return $this->image;
  43.     }
  44.     public function setImage(?MediaObject $image): self
  45.     {
  46.         $this->image $image;
  47.         return $this;
  48.     }
  49.     public function getType(): ?string
  50.     {
  51.         return $this->type;
  52.     }
  53.     public function setType(string $type): self
  54.     {
  55.         $this->type $type;
  56.         return $this;
  57.     }
  58.     public function isConfigurator(): ?bool
  59.     {
  60.         return $this->configurator;
  61.     }
  62.     public function setConfigurator(bool $configurator): self
  63.     {
  64.         $this->configurator $configurator;
  65.         return $this;
  66.     }
  67.     public function getLandingpage(): ?Landingpage
  68.     {
  69.         return $this->landingpage;
  70.     }
  71.     public function setLandingpage(?Landingpage $landingpage): self
  72.     {
  73.         $this->landingpage $landingpage;
  74.         return $this;
  75.     }
  76. }