src/Entity/WebContent.php line 10

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use App\Repository\WebContentRepository;
  4. use Doctrine\ORM\Mapping as ORM;
  5. use Symfony\Component\Serializer\Annotation\Groups;
  6. #[ORM\Entity(repositoryClassWebContentRepository::class)]
  7. class WebContent
  8. {
  9.     #[ORM\Id]
  10.     #[ORM\GeneratedValue(strategy'AUTO')]
  11.     #[ORM\Column(type'integer'uniquetrue)]
  12.     #[Groups(['category''company'])]
  13.     private $id;
  14.     #[ORM\ManyToOne(targetEntityAdapterContent::class, inversedBy'contents')]
  15.     #[ORM\JoinColumn(name'article_related_id'referencedColumnName'id')]
  16.     #[Groups(['category''company'])]
  17.     private $articleRelated;
  18.     #[ORM\ManyToOne(targetEntityLangue::class)]
  19.     #[ORM\JoinColumn(name'langue_content_id'referencedColumnName'id')]
  20.     #[Groups(['category''company'])]
  21.     private $langueContent;
  22.     #[ORM\Column(type'blob')]
  23.     #[Groups(['category''company'])]
  24.     private $rawText;
  25.     #[ORM\Column(type'blob')]
  26.     #[Groups(['category''company'])]
  27.     private $formatedText;
  28.     #[ORM\OneToOne(targetEntity'AdapterContent'mappedBy'AdapterTranslated'cascade: ['persist''remove'])]
  29.     #[Groups(['category''company'])]
  30.     private $ContentTranslated;
  31.     public function getId(): ?int
  32.     {
  33.         return $this->id;
  34.     }
  35.     public function getArticleRelated(): ?AdapterContent
  36.     {
  37.         return $this->articleRelated;
  38.     }
  39.     public function setArticleRelated(?AdapterContent $articleRelated): self
  40.     {
  41.         $this->articleRelated $articleRelated;
  42.         return $this;
  43.     }
  44.     public function getLangueContent(): ?Langue
  45.     {
  46.         return $this->langueContent;
  47.     }
  48.     public function setLangueContent(?Langue $langueContent): self
  49.     {
  50.         $this->langueContent $langueContent;
  51.         return $this;
  52.     }
  53.     public function getRawText(): ?string
  54.     {
  55.         return $this->rawText;
  56.     }
  57.     public function setRawText(string $rawText): self
  58.     {
  59.         $this->rawText $rawText;
  60.         return $this;
  61.     }
  62.     public function getFormatedText(): ?string
  63.     {
  64.         return $this->formatedText;
  65.     }
  66.     public function setFormatedText(string $formatedText): self
  67.     {
  68.         $this->formatedText $formatedText;
  69.         return $this;
  70.     }
  71.     public function getContentTranslated(): ?AdapterContent
  72.     {
  73.         return $this->ContentTranslated;
  74.     }
  75.     public function setContentTranslated(?AdapterContent $ContentTranslated): self
  76.     {
  77.         // unset the owning side of the relation if necessary
  78.         if ($ContentTranslated === null && $this->ContentTranslated !== null) {
  79.             $this->ContentTranslated->setAdapterTranslated(null);
  80.         }
  81.         // set the owning side of the relation if necessary
  82.         if ($ContentTranslated !== null && $ContentTranslated->getAdapterTranslated() !== $this) {
  83.             $ContentTranslated->setAdapterTranslated($this);
  84.         }
  85.         $this->ContentTranslated $ContentTranslated;
  86.         return $this;
  87.     }
  88. }