src/Entity/Usercontent.php line 9

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use App\Repository\UsercontentRepository;
  4. use Doctrine\ORM\Mapping as ORM;
  5. #[ORM\Entity(repositoryClassUsercontentRepository::class)]
  6. class Usercontent
  7. {
  8.     #[ORM\Id]
  9.     #[ORM\GeneratedValue]
  10.     #[ORM\Column(type'integer')]
  11.     private $id;
  12.     #[ORM\Column(type'string'length255)]
  13.     private $title;
  14.     #[ORM\Column(type'json')]
  15.     private $content = [];
  16.     #[ORM\Column(type'text')]
  17.     private $html;
  18.     #[ORM\ManyToOne(targetEntityUser::class, inversedBy'usercontents')]
  19.     #[ORM\JoinColumn(nullablefalse)]
  20.     private $user;
  21.     #[ORM\ManyToOne(targetEntityImage::class)]
  22.     private $titleImage;
  23.     #[ORM\Column(type'boolean')]
  24.     private $published false;
  25.     #[ORM\Column(type'text'nullabletrue)]
  26.     private $abstract;
  27.     #[ORM\OneToOne(targetEntityContent::class, cascade: ['persist''remove'])]
  28.     private $content_reference;
  29.     #[ORM\Column(type'string'length255nullabletrue)]
  30.     private $slug;
  31.     public function getId(): ?int
  32.     {
  33.         return $this->id;
  34.     }
  35.     public function getTitle(): ?string
  36.     {
  37.         return $this->title;
  38.     }
  39.     public function setTitle(string $title): self
  40.     {
  41.         $this->title $title;
  42.         return $this;
  43.     }
  44.     public function getContent(): ?array
  45.     {
  46.         return $this->content;
  47.     }
  48.     public function setContent(array $content): self
  49.     {
  50.         $this->content $content;
  51.         return $this;
  52.     }
  53.     public function getHtml(): ?string
  54.     {
  55.         return $this->html;
  56.     }
  57.     public function setHtml(string $html): self
  58.     {
  59.         $this->html $html;
  60.         return $this;
  61.     }
  62.     public function getUser(): ?User
  63.     {
  64.         return $this->user;
  65.     }
  66.     public function setUser(?User $user): self
  67.     {
  68.         $this->user $user;
  69.         return $this;
  70.     }
  71.     public function getTitleImage(): ?Image
  72.     {
  73.         return $this->titleImage;
  74.     }
  75.     public function setTitleImage(?Image $titleImage): self
  76.     {
  77.         $this->titleImage $titleImage;
  78.         return $this;
  79.     }
  80.     public function getPublished(): ?bool
  81.     {
  82.         return $this->published;
  83.     }
  84.     public function setPublished(bool $published): self
  85.     {
  86.         $this->published $published;
  87.         return $this;
  88.     }
  89.     public function getAbstract(): ?string
  90.     {
  91.         return $this->abstract;
  92.     }
  93.     public function setAbstract(?string $abstract): self
  94.     {
  95.         $this->abstract $abstract;
  96.         return $this;
  97.     }
  98.     public function getContentReference(): ?Content
  99.     {
  100.         return $this->content_reference;
  101.     }
  102.     public function setContentReference(?Content $content_reference): self
  103.     {
  104.         $this->content_reference $content_reference;
  105.         return $this;
  106.     }
  107.     public function getSlug(): ?string
  108.     {
  109.         return $this->slug;
  110.     }
  111.     public function setSlug(string $slug): self
  112.     {
  113.         $this->slug $slug;
  114.         return $this;
  115.     }
  116. }