src/Entity/Paragraph.php line 10

  1. <?php
  2. namespace App\Entity;
  3. use App\Repository\ParagraphRepository;
  4. use Doctrine\Common\Collections\ArrayCollection;
  5. use Doctrine\ORM\Mapping as ORM;
  6. #[ORM\Entity(repositoryClassParagraphRepository::class)]
  7. class Paragraph
  8. {
  9.     #[ORM\Id]
  10.     #[ORM\GeneratedValue]
  11.     #[ORM\Column(type'integer')]
  12.     private $id;
  13.     #[ORM\Column(type'string'length255nullabletrue)]
  14.     private $title;
  15.     #[ORM\Column(type'text'nullabletrue)]
  16.     private $text;
  17.     #[ORM\Column(type'string'length255nullabletrue)]
  18.     private $image;
  19.     #[ORM\Column(type'boolean'nullabletrue)]
  20.     private $isActive;
  21.     #[ORM\Column(type'datetime'nullabletrue)]
  22.     private $created;
  23.     #[ORM\ManyToOne(targetEntityArticle::class, inversedBy'paragraphs')]
  24.     private $article;
  25.     #[ORM\Column(type'smallint'nullabletrue)]
  26.     private $sequence;
  27.     #[ORM\ManyToOne(inversedBy'paragraphs')]
  28.     private ?Page $page null;
  29.     #[ORM\OneToMany(mappedBy'paragraph'targetEntityParagraphTranslation::class, cascade: ['persist''remove'], orphanRemovaltrue)]
  30.     private $translations;
  31.     public function __construct()
  32.     {
  33.         $this->translations = new ArrayCollection();
  34.     }
  35.     public function getTranslations()
  36.     {
  37.         return $this->translations;
  38.     }
  39.     public function getId(): ?int
  40.     {
  41.         return $this->id;
  42.     }
  43.     public function getTitle(): ?string
  44.     {
  45.         return $this->title;
  46.     }
  47.     public function setTitle(?string $title): self
  48.     {
  49.         $this->title $title;
  50.         return $this;
  51.     }
  52.     public function getText(): ?string
  53.     {
  54.         return $this->text;
  55.     }
  56.     public function setText(?string $text): self
  57.     {
  58.         $this->text $text;
  59.         return $this;
  60.     }
  61.     public function getImage(): ?string
  62.     {
  63.         return $this->image;
  64.     }
  65.     public function setImage(?string $image): self
  66.     {
  67.         $this->image $image;
  68.         return $this;
  69.     }
  70.     public function getIsActive(): ?bool
  71.     {
  72.         return $this->isActive;
  73.     }
  74.     public function setIsActive(?bool $isActive): self
  75.     {
  76.         $this->isActive $isActive;
  77.         return $this;
  78.     }
  79.     public function getCreated(): ?\DateTimeInterface
  80.     {
  81.         return $this->created;
  82.     }
  83.     public function setCreated(?\DateTimeInterface $created): self
  84.     {
  85.         $this->created $created;
  86.         return $this;
  87.     }
  88.     public function getArticle(): ?Article
  89.     {
  90.         return $this->article;
  91.     }
  92.     public function setArticle(?Article $article): self
  93.     {
  94.         $this->article $article;
  95.         return $this;
  96.     }
  97.     public function getSequence(): ?int
  98.     {
  99.         return $this->sequence;
  100.     }
  101.     public function setSequence(?int $sequence): self
  102.     {
  103.         $this->sequence $sequence;
  104.         return $this;
  105.     }
  106.     public function getPage(): ?Page
  107.     {
  108.         return $this->page;
  109.     }
  110.     public function setPage(?Page $page): self
  111.     {
  112.         $this->page $page;
  113.         return $this;
  114.     }
  115. }