src/Entity/ModuleVideo.php line 10

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use App\Repository\ModuleVideoRepository;
  4. use Doctrine\ORM\Mapping as ORM;
  5. use Symfony\Component\String\Slugger\SluggerInterface;
  6. #[ORM\Entity(repositoryClassModuleVideoRepository::class)]
  7. class ModuleVideo
  8. {
  9.     #[ORM\Id]
  10.     #[ORM\GeneratedValue]
  11.     #[ORM\Column(type'integer')]
  12.     private $id;
  13.     #[ORM\Column(type'string'length255)]
  14.     private $titre;
  15.     #[ORM\Column(type'string'length255)]
  16.     private $slug;
  17.     #[ORM\Column(type'text')]
  18.     private $codeHtml;
  19.     #[ORM\ManyToOne(targetEntityAccountingFirm::class, inversedBy'moduleVideos')]
  20.     #[ORM\JoinColumn(nullablefalse)]
  21.     private ?AccountingFirm $accountingFirm null;
  22.     #[ORM\ManyToOne(targetEntityEmailingClientCampaign::class)]
  23.     private $emailing;
  24.     public function getId(): ?int
  25.     {
  26.         return $this->id;
  27.     }
  28.     public function getTitre(): ?string
  29.     {
  30.         return $this->titre;
  31.     }
  32.     public function setTitre(string $titre): self
  33.     {
  34.         $this->titre $titre;
  35.         return $this;
  36.     }
  37.     public function getSlug(): ?string
  38.     {
  39.         return $this->slug;
  40.     }
  41.     public function setSlug(string $slug): self
  42.     {
  43.         $this->slug $slug;
  44.         return $this;
  45.     }
  46.     public function getCodeHtml(): ?string
  47.     {
  48.         return $this->codeHtml;
  49.     }
  50.     public function setCodeHtml(string $codeHtml): self
  51.     {
  52.         $this->codeHtml $codeHtml;
  53.         return $this;
  54.     }
  55.     public function getAccountingFirm(): ?AccountingFirm
  56.     {
  57.         return $this->accountingFirm;
  58.     }
  59.     public function setAccountingFirm(?AccountingFirm $accountingFirm): self
  60.     {
  61.         $this->accountingFirm $accountingFirm;
  62.         return $this;
  63.     }
  64.     public function generateSlug(SluggerInterface $slugger): void
  65.     {
  66.         $this->slug strtolower($slugger->slug($this->titre)->toString());
  67.     }
  68.     public function getEmailing(): ?EmailingClientCampaign
  69.     {
  70.         return $this->emailing;
  71.     }
  72.     public function setEmailing(?EmailingClientCampaign $emailing): self
  73.     {
  74.         $this->emailing $emailing;
  75.         return $this;
  76.     }
  77. }