src/Entity/PodcastEpisode.php line 18

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use Doctrine\ORM\Mapping as ORM;
  4. use App\Repository\PodcastEpisodeRepository;
  5. use Doctrine\Common\Collections\ArrayCollection;
  6. use Doctrine\Common\Collections\Collection;
  7. use Symfony\Component\HttpFoundation\File\File;
  8. use Vich\UploaderBundle\Mapping\Annotation as Vich;
  9. use Symfony\Component\Validator\Constraints as Assert;
  10. // PodcastEpisode est pour place à l'expert-comptable => widget pour EC participants à l'épisode et sur le site de lagence.expert
  11. /**
  12.  * @Vich\Uploadable
  13.  */
  14. #[ORM\Entity(repositoryClassPodcastEpisodeRepository::class)]
  15. class PodcastEpisode
  16. {
  17.   #[ORM\Id]
  18.   #[ORM\GeneratedValue]
  19.   #[ORM\Column(type'integer')]
  20.   private $id;
  21.   #[ORM\Column(type'integer')]
  22.   private $number;
  23.   #[ORM\Column(type'string'length255nullabletrue)]
  24.   private $title;
  25.   #[ORM\Column(type'text'length16777215nullabletrue)]
  26.   private $main_description_txt;
  27.   #[ORM\Column(type'text'length16777215nullabletrue)]
  28.   private $main_description_rtf;
  29.   #[ORM\Column(type'text'length16777215nullabletrue)]
  30.   private $sub_description_txt;
  31.   #[ORM\Column(type'text'length16777215nullabletrue)]
  32.   private $sub_description_rtf;
  33.   #[ORM\Column(type'text'length16777215nullabletrue)]
  34.   private $notes_txt;
  35.   #[ORM\Column(type'text'length16777215nullabletrue)]
  36.   private $notes_rtf;
  37.   #[ORM\Column(type'text'length16777215nullabletrue)]
  38.   private $url_amazon;
  39.   #[ORM\Column(type'text'length16777215nullabletrue)]
  40.   private $url_deezer;
  41.   #[ORM\Column(type'text'length16777215nullabletrue)]
  42.   private $url_itunes;
  43.   #[ORM\Column(type'text'length16777215nullabletrue)]
  44.   private $url_spotify;
  45.   #[ORM\Column(type'text'length16777215nullabletrue)]
  46.   private $url_youtube;
  47.   #[ORM\Column(type'date'nullabletrue)]
  48.   private $publishedDate;
  49.   #[ORM\OneToMany(mappedBy'podcastEc'targetEntityPodcastPrivateTask::class)]
  50.   private $podcastPrivateTasks;
  51.   #[ORM\Column(type'string'length255nullabletrue)]
  52.   private $idAushaEpisodeEc;
  53.   #[ORM\Column(type'string'length255nullabletrue)]
  54.   private $filenameEc;
  55.   #[ORM\Column(type'string'length255nullabletrue)]
  56.   private $idAushaEpisodeAgence;
  57.   #[ORM\Column(type'string'length255nullabletrue)]
  58.   private $filenameAgence;
  59.   #[ORM\Column(type'string'length255nullabletrue)]
  60.   private $idAushaPlaylist;
  61.   #[ORM\Column(type'boolean'nullabletrue)]
  62.   private $generate;
  63.   /**
  64.    * @Vich\UploadableField(mapping="podcast_middle_file", fileNameProperty="podcastMiddleFilename")
  65.    * @var File|null
  66.    */
  67.   private ?File $podcastMiddleFile null;
  68.   #[ORM\Column(nullabletrue)]
  69.   private ?string $podcastMiddleFilename null;
  70.   #[ORM\ManyToOne(targetEntityPodcastExpertComptable::class, inversedBy'podcastEpisodesEc')]
  71.   private $podcastExpertComptable;
  72.     // NOTE: This is not a mapped field of entity metadata, just a simple property.
  73.     /**
  74.      * @Vich\UploadableField(mapping="podcast_ec_image_file", fileNameProperty="imageName")
  75.      * @var File|null
  76.      */
  77.     private ?File $imageFile null;
  78.     #[ORM\Column(type'string'length255nullabletrue)]
  79.     private ?string $imageName null;
  80.   #[ORM\Column(type'datetime_immutable'nullabletrue)]
  81.   private ?\DateTimeImmutable $updateAt null;
  82.   public function __construct()
  83.   {
  84.     $this->podcastPrivateTasks = new ArrayCollection();
  85.   }
  86.   public function getId(): ?int
  87.   {
  88.     return $this->id;
  89.   }
  90.   public function getNumber(): ?int
  91.   {
  92.     return $this->number;
  93.   }
  94.   public function setNumber(?int $number): self
  95.   {
  96.     $this->number $number;
  97.     return $this;
  98.   }
  99.   public function getTitle(): ?string
  100.   {
  101.     return $this->title;
  102.   }
  103.   public function setTitle(?string $title): self
  104.   {
  105.     $this->title $title;
  106.     return $this;
  107.   }
  108.   public function getMainDescriptionTxt(): ?string
  109.   {
  110.     return $this->main_description_txt;
  111.   }
  112.   public function setMainDescriptionTxt(?string $main_description_txt): self
  113.   {
  114.     $this->main_description_txt $main_description_txt;
  115.     return $this;
  116.   }
  117.   public function getMainDescriptionRtf(): ?string
  118.   {
  119.     return $this->main_description_rtf;
  120.   }
  121.   public function setMainDescriptionRtf(?string $main_description_rtf): self
  122.   {
  123.     $this->main_description_rtf $main_description_rtf;
  124.     $descriptifTexte str_replace('&nbsp;'' '$main_description_rtf);
  125.     $descriptifTexte str_replace('<br />'' '$descriptifTexte);
  126.     $descriptifTexte strip_tags($descriptifTexte);
  127.     $this->main_description_txt $descriptifTexte;
  128.     return $this;
  129.   }
  130.   public function getSubDescriptionTxt(): ?string
  131.   {
  132.     return $this->sub_description_txt;
  133.   }
  134.   public function setSubDescriptionTxt(?string $sub_description_txt): self
  135.   {
  136.     $this->sub_description_txt $sub_description_txt;
  137.     return $this;
  138.   }
  139.   public function getSubDescriptionRtf(): ?string
  140.   {
  141.     return $this->sub_description_rtf;
  142.   }
  143.   public function setSubDescriptionRtf(?string $sub_description_rtf): self
  144.   {
  145.     $this->sub_description_rtf $sub_description_rtf;
  146.     $descriptifTexte str_replace('&nbsp;'' '$sub_description_rtf);
  147.     $descriptifTexte str_replace('<br />'' '$descriptifTexte);
  148.     $descriptifTexte strip_tags($descriptifTexte);
  149.     $this->sub_description_txt $descriptifTexte;
  150.     return $this;
  151.   }
  152.   public function getNotesTxt(): ?string
  153.   {
  154.     return $this->notes_txt;
  155.   }
  156.   public function setNotesTxt(?string $notes_txt): self
  157.   {
  158.     $this->notes_txt $notes_txt;
  159.     return $this;
  160.   }
  161.   public function getNotesRtf(): ?string
  162.   {
  163.     return $this->notes_rtf;
  164.   }
  165.   public function setNotesRtf(?string $notes_rtf): self
  166.   {
  167.     $this->notes_rtf $notes_rtf;
  168.     $descriptifTexte str_replace('&nbsp;'' '$notes_rtf);
  169.     $descriptifTexte str_replace('<br />'' '$descriptifTexte);
  170.     $descriptifTexte strip_tags($descriptifTexte);
  171.     $this->notes_txt $descriptifTexte;
  172.     return $this;
  173.   }
  174.   public function getUrlAmazon(): ?string
  175.   {
  176.     return $this->url_amazon;
  177.   }
  178.   public function setUrlAmazon(?string $url_amazon): self
  179.   {
  180.     $this->url_amazon $url_amazon;
  181.     return $this;
  182.   }
  183.   public function getUrlDeezer(): ?string
  184.   {
  185.     return $this->url_deezer;
  186.   }
  187.   public function setUrlDeezer(?string $url_deezer): self
  188.   {
  189.     $this->url_deezer $url_deezer;
  190.     return $this;
  191.   }
  192.   public function getUrlItunes(): ?string
  193.   {
  194.     return $this->url_itunes;
  195.   }
  196.   public function setUrlItunes(?string $url_itunes): self
  197.   {
  198.     $this->url_itunes $url_itunes;
  199.     return $this;
  200.   }
  201.   public function getUrlSpotify(): ?string
  202.   {
  203.     return $this->url_spotify;
  204.   }
  205.   public function setUrlSpotify(?string $url_spotify): self
  206.   {
  207.     $this->url_spotify $url_spotify;
  208.     return $this;
  209.   }
  210.   public function getUrlYoutube(): ?string
  211.   {
  212.     return $this->url_youtube;
  213.   }
  214.   public function setUrlYoutube(?string $url_youtube): self
  215.   {
  216.     $this->url_youtube $url_youtube;
  217.     return $this;
  218.   }
  219.   public function getPublishedDate(): ?\DateTime
  220.   {
  221.     return $this->publishedDate;
  222.   }
  223.   public function setPublishedDate(?\DateTime $publishedDate): self
  224.   {
  225.     $this->publishedDate $publishedDate;
  226.     return $this;
  227.   }
  228.   /**
  229.    * @return Collection<int, PodcastPrivateTask>
  230.    */
  231.   public function getPodcastPrivateTasks(): Collection
  232.   {
  233.     return $this->podcastPrivateTasks;
  234.   }
  235.   public function addPodcastPrivateTask(PodcastPrivateTask $podcastPrivateTask): self
  236.   {
  237.     if (!$this->podcastPrivateTasks->contains($podcastPrivateTask)) {
  238.       $this->podcastPrivateTasks[] = $podcastPrivateTask;
  239.       $podcastPrivateTask->setPodcastEc($this);
  240.     }
  241.     return $this;
  242.   }
  243.   public function removePodcastPrivateTask(PodcastPrivateTask $podcastPrivateTask): self
  244.   {
  245.     if ($this->podcastPrivateTasks->removeElement($podcastPrivateTask)) {
  246.       // set the owning side to null (unless already changed)
  247.       if ($podcastPrivateTask->getPodcastEc() === $this) {
  248.         $podcastPrivateTask->setPodcastEc(null);
  249.       }
  250.     }
  251.     return $this;
  252.   }
  253.   public function getIdAushaEpisodeEc(): ?string
  254.   {
  255.     return $this->idAushaEpisodeEc;
  256.   }
  257.   public function setIdAushaEpisodeEc(?string $idAushaEpisodeEc): self
  258.   {
  259.     $this->idAushaEpisodeEc $idAushaEpisodeEc;
  260.     return $this;
  261.   }
  262.   public function getFilenameEc(): ?string
  263.   {
  264.     return $this->filenameEc;
  265.   }
  266.   public function setFilenameEc(?string $filenameEc): self
  267.   {
  268.     $this->filenameEc $filenameEc;
  269.     return $this;
  270.   }
  271.   public function getIdAushaEpisodeAgence(): ?string
  272.   {
  273.     return $this->idAushaEpisodeAgence;
  274.   }
  275.   public function setIdAushaEpisodeAgence(?string $idAushaEpisodeAgence): self
  276.   {
  277.     $this->idAushaEpisodeAgence $idAushaEpisodeAgence;
  278.     return $this;
  279.   }
  280.   public function getFilenameAgence(): ?string
  281.   {
  282.     return $this->filenameAgence;
  283.   }
  284.   public function setFilenameAgence(?string $filenameAgence): self
  285.   {
  286.     $this->filenameAgence $filenameAgence;
  287.     return $this;
  288.   }
  289.   public function getIdAushaPlaylist(): ?string
  290.   {
  291.     return $this->idAushaPlaylist;
  292.   }
  293.   public function setIdAushaPlaylist(?string $idAushaPlaylist): self
  294.   {
  295.     $this->idAushaPlaylist $idAushaPlaylist;
  296.     return $this;
  297.   }
  298.   /**
  299.    * If manually uploading a file (i.e. not using Symfony Form) ensure an instance
  300.    * of 'UploadedFile' is injected into this setter to trigger the update. If this
  301.    * bundle's configuration parameter 'inject_on_load' is set to 'true' this setter
  302.    * must be able to accept an instance of 'File' as the bundle will inject one here
  303.    * during Doctrine hydration.
  304.    *
  305.    * @param File|\Symfony\Component\HttpFoundation\File\UploadedFile|null $imageFile
  306.    */
  307.   public function setPodcastMiddleFile(?File $podcastMiddleFile null): void
  308.   {
  309.     $this->podcastMiddleFile $podcastMiddleFile;
  310.     if (null !== $podcastMiddleFile) {
  311.       // It is required that at least one field changes if you are using doctrine
  312.       // otherwise the event listeners won't be called and the file is lost
  313.       $this->updateAt = new \DateTimeImmutable();
  314.     }
  315.   }
  316.   public function getPodcastMiddleFile(): ?File
  317.   {
  318.     return $this->podcastMiddleFile;
  319.   }
  320.   public function setPodcastMiddleFileName(?string $podcastMiddleFilename): void
  321.   {
  322.     $this->podcastMiddleFilename $podcastMiddleFilename;
  323.   }
  324.   public function getPodcastMiddleFileName(): ?string
  325.   {
  326.     return $this->podcastMiddleFilename;
  327.   }
  328.   public function getPodcastExpertComptable(): ?PodcastExpertComptable
  329.   {
  330.       return $this->podcastExpertComptable;
  331.   }
  332.   public function setPodcastExpertComptable(?PodcastExpertComptable $podcastExpertComptable): self
  333.   {
  334.       $this->podcastExpertComptable $podcastExpertComptable;
  335.       return $this;
  336.   }
  337.   public function isGenerate(): ?bool
  338.   {
  339.     return $this->generate;
  340.   }
  341.   public function setGenerate(?bool $generate): self
  342.   {
  343.     $this->generate $generate;
  344.     return $this;
  345.   }
  346.     public function setImageFile(?File $imageFile null): void
  347.     {
  348.         $this->imageFile $imageFile;
  349.         if (null !== $imageFile) {
  350.             // It is required that at least one field changes if you are using doctrine
  351.             // otherwise the event listeners won't be called and the file is lost
  352.             $this->updateAt = new \DateTimeImmutable();
  353.         }
  354.     }
  355.     public function getImageFile(): ?File
  356.     {
  357.         return $this->imageFile;
  358.     }
  359.     public function setImageName(?string $imageName): void
  360.     {
  361.         $this->imageName $imageName;
  362.     }
  363.     public function getImageName(): ?string
  364.     {
  365.         return $this->imageName;
  366.     }
  367.     public function getUpdateAt(): ?\DateTimeImmutable
  368.     {
  369.         return $this->updateAt;
  370.     }
  371.     public function setUpdateAt(?\DateTimeImmutable $updateAt): self
  372.     {
  373.         $this->updateAt $updateAt;
  374.         return $this;
  375.     }
  376. }