src/Entity/Course.php line 12

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use App\Repository\CourseRepository;
  4. use Doctrine\Common\Collections\ArrayCollection;
  5. use Doctrine\Common\Collections\Collection;
  6. use Doctrine\DBAL\Types\Types;
  7. use Doctrine\ORM\Mapping as ORM;
  8. #[ORM\Entity(repositoryClassCourseRepository::class)]
  9. class Course
  10. {
  11.     #[ORM\Id]
  12.     #[ORM\GeneratedValue]
  13.     #[ORM\Column(type'integer')]
  14.     private $id;
  15.     #[ORM\ManyToOne(targetEntityClubInfo::class, inversedBy'courses'fetch"EAGER")]
  16.     private $club;
  17.     #[ORM\OneToOne(targetEntityAddress::class, inversedBy'course'cascade: ['persist''remove'])]
  18.     private $address;
  19.     #[ORM\OneToMany(targetEntityPhoto::class, mappedBy'course'cascade: ['persist''remove'])]
  20.     private $photos;
  21.     #[ORM\OneToMany(targetEntityVideo::class, mappedBy'course'cascade: ['persist''remove'])]
  22.     private $videos;
  23.     #[ORM\Column(type'array'nullabletrue)]
  24.     private $logistic = [];
  25.     #[ORM\OneToMany(targetEntityAirport::class, mappedBy'course'cascade: ['persist''remove'], orphanRemovaltrue)]
  26.     private $airports;
  27.     #[ORM\OneToMany(targetEntityBeach::class, mappedBy'course'cascade: ['persist''remove'], orphanRemovaltrue)]
  28.     private $beaches;
  29.     #[ORM\OneToMany(targetEntityStation::class, mappedBy'course'cascade: ['persist''remove'], orphanRemovaltrue)]
  30.     private $stations;
  31.     #[ORM\OneToMany(targetEntityRestaurant::class, mappedBy'course'cascade: ['persist''remove'], orphanRemovaltrue)]
  32.     private $restaurants;
  33.     #[ORM\OneToMany(targetEntityAccommodation::class, mappedBy'course'cascade: ['persist''remove'], orphanRemovaltrue)]
  34.     private $accommodations;
  35.     #[ORM\ManyToOne(targetEntityUser::class, inversedBy'courses')]
  36.     private $owner;
  37.     #[ORM\ManyToMany(targetEntitySport::class, inversedBy'courses')]
  38.     private $sports;
  39.     #[ORM\OneToMany(targetEntityCourseAvailability::class, mappedBy'course'cascade: ['persist''remove'])]
  40.     private $availabilities;
  41.     #[ORM\Column(type'string'length255nullabletrue)]
  42.     private $frequency;
  43.     #[ORM\ManyToMany(targetEntityLanguage::class, inversedBy'courses')]
  44.     private $languages;
  45.     
  46.     #[ORM\OneToMany(targetEntityFeaturedCourse::class, mappedBy'course')]
  47.     private $featureds;
  48.     #[ORM\Column(type'string'length255)]
  49.     private $status;
  50.     #[ORM\Column(type'datetime'nullabletrue)]
  51.     private $createdAt;
  52.     #[ORM\ManyToMany(targetEntityAge::class, inversedBy'courses')]
  53.     private $ages;
  54.     #[ORM\ManyToMany(targetEntityLevel::class, inversedBy'courses')]
  55.     private $levels;
  56.     #[ORM\ManyToMany(targetEntityTrainee::class, mappedBy'favorites')]
  57.     private $traineesFavorites;
  58.     #[ORM\OneToMany(targetEntityTranslatedCourse::class, mappedBy'course'cascade: ['persist''remove'])]
  59.     private $translatedContents;
  60.     #[ORM\Column(type'string'length255)]
  61.     private $token;
  62.     #[ORM\OneToMany(targetEntityBooking::class, mappedBy'course')]
  63.     private $bookings;
  64.     #[ORM\Column(type'string'length255)]
  65.     private $countryCode;
  66.     #[ORM\Column(type'float'nullabletrue)]
  67.     private $latitude;
  68.     #[ORM\Column(type'float'nullabletrue)]
  69.     private $longitude;
  70.     #[ORM\OneToMany(targetEntityCourseViewsStat::class, mappedBy'course'cascade: ['persist''remove'])]
  71.     private $courseViewsStats;
  72.     #[ORM\Column(type'boolean')]
  73.     private $hideClubInfo;
  74.     #[ORM\Column(type'boolean')]
  75.     private $hideCoachInfo;
  76.     #[ORM\Column(type'integer'length255nullabletrue)]
  77.     private $stepSaved;
  78.     #[ORM\ManyToMany(targetEntityCoachInfo::class, inversedBy'courses')]
  79.     private $coachsInfos;
  80.     #[ORM\Column(type'boolean'nullabletrue)]
  81.     private $sendedAlert;
  82.     #[ORM\Column(length255nullabletrue)]
  83.     private ?string $cover null;
  84.     #[ORM\OneToMany(mappedBy'course'targetEntityPriceBundle::class)]
  85.     private Collection $priceBundles;
  86.     private $translateName;
  87.     private $translateDescription;
  88.     private $translatePlanning;
  89.     private $translateOther;
  90.     #[ORM\Column(nullabletrue)]
  91.     private ?bool $visibleToClub true;
  92.     #[ORM\Column(nullabletrue)]
  93.     private ?bool $visibleToCoach true;
  94.     #[ORM\Column(nullabletrue)]
  95.     private ?bool $visibleToOperator true;
  96.     #[ORM\Column(typeTypes::DATETIME_MUTABLEnullabletrue)]
  97.     private ?\DateTimeInterface $publishedAt null;
  98.     #[ORM\Column(typeTypes::DATETIME_MUTABLEnullabletrue)]
  99.     private ?\DateTimeInterface $updatedAt null;
  100.     #[ORM\ManyToOne(inversedBy'associatedCourses')]
  101.     private ?OperatorInfo $operator null;
  102.     #[ORM\OneToMany(mappedBy'course'targetEntityNoteRequest::class)]
  103.     private Collection $noteRequests;
  104.     #[ORM\OneToMany(mappedBy'course'targetEntityNote::class)]
  105.     private Collection $notes;
  106.     public function __construct()
  107.     {
  108.         $this->photos = new ArrayCollection();
  109.         $this->videos = new ArrayCollection();
  110.         $this->airports = new ArrayCollection();
  111.         $this->beaches = new ArrayCollection();
  112.         $this->stations = new ArrayCollection();
  113.         $this->restaurants = new ArrayCollection();
  114.         $this->accommodations = new ArrayCollection();
  115.         $this->sports = new ArrayCollection();
  116.         $this->availabilities = new ArrayCollection();
  117.         $this->languages = new ArrayCollection();
  118.         $this->featureds = new ArrayCollection();
  119.         $this->ages = new ArrayCollection();
  120.         $this->levels = new ArrayCollection();
  121.         $this->traineesFavorites = new ArrayCollection();
  122.         $this->translatedContents = new ArrayCollection();
  123.         $this->bookings = new ArrayCollection();
  124.         $this->courseViewsStats = new ArrayCollection();
  125.         $this->coachsInfos = new ArrayCollection();
  126.         $this->priceBundles = new ArrayCollection();
  127.         $this->noteRequests = new ArrayCollection();
  128.         $this->notes = new ArrayCollection();
  129.     }
  130.     public function getId(): ?int
  131.     {
  132.         return $this->id;
  133.     }
  134.     public function  getPrice()
  135.     {
  136.         return $this->availabilities->first()->getPrice();
  137.     }
  138.     
  139.     public function getClub(): ?ClubInfo
  140.     {
  141.         return $this->club;
  142.     }
  143.     public function setClub(?ClubInfo $club): self
  144.     {
  145.         $this->club $club;
  146.         return $this;
  147.     }
  148.     public function getAddress(): ?Address
  149.     {
  150.         return $this->address;
  151.     }
  152.     public function setAddress(?Address $address): self
  153.     {
  154.         $this->address $address;
  155.         return $this;
  156.     }
  157.     /**
  158.      * @return Collection|Photo[]
  159.      */
  160.     public function getPhotos(): Collection
  161.     {
  162.         return $this->photos;
  163.     }
  164.     public function addPhoto(Photo $photo): self
  165.     {
  166.         if (!$this->photos->contains($photo)) {
  167.             $this->photos[] = $photo;
  168.             $photo->setCourse($this);
  169.         }
  170.         return $this;
  171.     }
  172.     public function removePhoto(Photo $photo): self
  173.     {
  174.         if ($this->photos->removeElement($photo)) {
  175.             // set the owning side to null (unless already changed)
  176.             if ($photo->getCourse() === $this) {
  177.                 $photo->setCourse(null);
  178.             }
  179.         }
  180.         return $this;
  181.     }
  182.     /**
  183.      * @return Collection|Video[]
  184.      */
  185.     public function getVideos(): Collection
  186.     {
  187.         return $this->videos;
  188.     }
  189.     public function addVideo(Video $video): self
  190.     {
  191.         if (!$this->videos->contains($video)) {
  192.             $this->videos[] = $video;
  193.             $video->setCourse($this);
  194.         }
  195.         return $this;
  196.     }
  197.     public function removeVideo(Video $video): self
  198.     {
  199.         if ($this->videos->removeElement($video)) {
  200.             // set the owning side to null (unless already changed)
  201.             if ($video->getCourse() === $this) {
  202.                 $video->setCourse(null);
  203.             }
  204.         }
  205.         return $this;
  206.     }
  207.     public function getLogistic(): ?array
  208.     {
  209.         return $this->logistic;
  210.     }
  211.     public function setLogistic(?array $logistic): self
  212.     {
  213.         $this->logistic $logistic;
  214.         return $this;
  215.     }
  216.     /**
  217.      * @return Collection|Airport[]
  218.      */
  219.     public function getAirports(): Collection
  220.     {
  221.         return $this->airports;
  222.     }
  223.     public function addAirport(Airport $airport): self
  224.     {
  225.         if (!$this->airports->contains($airport)) {
  226.             $this->airports[] = $airport;
  227.             $airport->setCourse($this);
  228.         }
  229.         return $this;
  230.     }
  231.     public function removeAirport(Airport $airport): self
  232.     {
  233.         if ($this->airports->removeElement($airport)) {
  234.             // set the owning side to null (unless already changed)
  235.             if ($airport->getCourse() === $this) {
  236.                 $airport->setCourse(null);
  237.             }
  238.         }
  239.         return $this;
  240.     }
  241.     /**
  242.      * @return Collection|Beach[]
  243.      */
  244.     public function getBeaches(): Collection
  245.     {
  246.         return $this->beaches;
  247.     }
  248.     public function addBeach(Beach $beach): self
  249.     {
  250.         if (!$this->beaches->contains($beach)) {
  251.             $this->beaches[] = $beach;
  252.             $beach->setCourse($this);
  253.         }
  254.         return $this;
  255.     }
  256.     public function removeBeach(Beach $beach): self
  257.     {
  258.         if ($this->beaches->removeElement($beach)) {
  259.             // set the owning side to null (unless already changed)
  260.             if ($beach->getCourse() === $this) {
  261.                 $beach->setCourse(null);
  262.             }
  263.         }
  264.         return $this;
  265.     }
  266.     /**
  267.      * @return Collection|Station[]
  268.      */
  269.     public function getStations(): Collection
  270.     {
  271.         return $this->stations;
  272.     }
  273.     public function addStation(Station $station): self
  274.     {
  275.         if (!$this->stations->contains($station)) {
  276.             $this->stations[] = $station;
  277.             $station->setCourse($this);
  278.         }
  279.         return $this;
  280.     }
  281.     public function removeStation(Station $station): self
  282.     {
  283.         if ($this->stations->removeElement($station)) {
  284.             // set the owning side to null (unless already changed)
  285.             if ($station->getCourse() === $this) {
  286.                 $station->setCourse(null);
  287.             }
  288.         }
  289.         return $this;
  290.     }
  291.     /**
  292.      * @return Collection|Restaurant[]
  293.      */
  294.     public function getRestaurants(): Collection
  295.     {
  296.         return $this->restaurants;
  297.     }
  298.     public function addRestaurant(Restaurant $restaurant): self
  299.     {
  300.         if (!$this->restaurants->contains($restaurant)) {
  301.             $this->restaurants[] = $restaurant;
  302.             $restaurant->setCourse($this);
  303.         }
  304.         return $this;
  305.     }
  306.     public function removeRestaurant(Restaurant $restaurant): self
  307.     {
  308.         if ($this->restaurants->removeElement($restaurant)) {
  309.             // set the owning side to null (unless already changed)
  310.             if ($restaurant->getCourse() === $this) {
  311.                 $restaurant->setCourse(null);
  312.             }
  313.         }
  314.         return $this;
  315.     }
  316.     /**
  317.      * @return Collection|Accommodation[]
  318.      */
  319.     public function getAccommodations(): Collection
  320.     {
  321.         return $this->accommodations;
  322.     }
  323.     public function addAccommodation(Accommodation $accommodation): self
  324.     {
  325.         if (!$this->accommodations->contains($accommodation)) {
  326.             $this->accommodations[] = $accommodation;
  327.             $accommodation->setCourse($this);
  328.         }
  329.         return $this;
  330.     }
  331.     public function removeAccommodation(Accommodation $accommodation): self
  332.     {
  333.         if ($this->accommodations->removeElement($accommodation)) {
  334.             // set the owning side to null (unless already changed)
  335.             if ($accommodation->getCourse() === $this) {
  336.                 $accommodation->setCourse(null);
  337.             }
  338.         }
  339.         return $this;
  340.     }
  341.     public function getOwner(): ?User
  342.     {
  343.         return $this->owner;
  344.     }
  345.     public function setOwner(?User $owner): self
  346.     {
  347.         $this->owner $owner;
  348.         return $this;
  349.     }
  350.     /**
  351.      * @return Collection|Sport[]
  352.      */
  353.     public function getSports(): Collection
  354.     {
  355.         return $this->sports;
  356.     }
  357.     public function addSport(Sport $sport): self
  358.     {
  359.         if (!$this->sports->contains($sport)) {
  360.             $this->sports[] = $sport;
  361.         }
  362.         return $this;
  363.     }
  364.     public function removeSport(Sport $sport): self
  365.     {
  366.         $this->sports->removeElement($sport);
  367.         return $this;
  368.     }
  369.     /**
  370.      * @return Collection|CourseAvailability[]
  371.      */
  372.     public function getAvailabilities(): Collection
  373.     {
  374.         return $this->availabilities;
  375.     }
  376.     public function addAvailability(CourseAvailability $availability): self
  377.     {
  378.         if (!$this->availabilities->contains($availability)) {
  379.             $this->availabilities[] = $availability;
  380.             $availability->setCourse($this);
  381.         }
  382.         return $this;
  383.     }
  384.     public function removeAvailability(CourseAvailability $availability): self
  385.     {
  386.         if ($this->availabilities->removeElement($availability)) {
  387.             // set the owning side to null (unless already changed)
  388.             if ($availability->getCourse() === $this) {
  389.                 $availability->setCourse(null);
  390.             }
  391.         }
  392.         return $this;
  393.     }
  394.     public function getFrequency(): ?string
  395.     {
  396.         return $this->frequency;
  397.     }
  398.     public function setFrequency(string $frequency): self
  399.     {
  400.         $this->frequency $frequency;
  401.         return $this;
  402.     }
  403.     /**
  404.      * @return Collection|Language[]
  405.      */
  406.     public function getLanguages(): Collection
  407.     {
  408.         return $this->languages;
  409.     }
  410.     public function addLanguage(Language $language): self
  411.     {
  412.         if (!$this->languages->contains($language)) {
  413.             $this->languages[] = $language;
  414.         }
  415.         return $this;
  416.     }
  417.     public function removeLanguage(Language $language): self
  418.     {
  419.         $this->languages->removeElement($language);
  420.         return $this;
  421.     }
  422.     /**
  423.      * @return Collection|FeaturedCourse[]
  424.      */
  425.     public function getFeatureds(): Collection
  426.     {
  427.         return $this->featureds;
  428.     }
  429.     public function addFeatured(FeaturedCourse $featured): self
  430.     {
  431.         if (!$this->featureds->contains($featured)) {
  432.             $this->featureds[] = $featured;
  433.             $featured->setCourse($this);
  434.         }
  435.         return $this;
  436.     }
  437.     public function removeFeatured(FeaturedCourse $featured): self
  438.     {
  439.         if ($this->featureds->removeElement($featured)) {
  440.             // set the owning side to null (unless already changed)
  441.             if ($featured->getCourse() === $this) {
  442.                 $featured->setCourse(null);
  443.             }
  444.         }
  445.         return $this;
  446.     }
  447.     public function getStatus(): ?string
  448.     {
  449.         return $this->status;
  450.     }
  451.     public function setStatus(string $status): self
  452.     {
  453.         $this->status $status;
  454.         return $this;
  455.     }
  456.     public function getCreatedAt(): ?\DateTimeInterface
  457.     {
  458.         return $this->createdAt;
  459.     }
  460.     public function setCreatedAt(\DateTimeInterface $createdAt): self
  461.     {
  462.         $this->createdAt $createdAt;
  463.         return $this;
  464.     }
  465.     /**
  466.      * @return Collection|Age[]
  467.      */
  468.     public function getAges(): Collection
  469.     {
  470.         return $this->ages;
  471.     }
  472.     public function addAge(Age $age): self
  473.     {
  474.         if (!$this->ages->contains($age)) {
  475.             $this->ages[] = $age;
  476.         }
  477.         return $this;
  478.     }
  479.     public function removeAge(Age $age): self
  480.     {
  481.         $this->ages->removeElement($age);
  482.         return $this;
  483.     }
  484.     /**
  485.      * @return Collection|Level[]
  486.      */
  487.     public function getLevels(): Collection
  488.     {
  489.         return $this->levels;
  490.     }
  491.     public function addLevel(Level $level): self
  492.     {
  493.         if (!$this->levels->contains($level)) {
  494.             $this->levels[] = $level;
  495.         }
  496.         return $this;
  497.     }
  498.     public function removeLevel(Level $level): self
  499.     {
  500.         $this->levels->removeElement($level);
  501.         return $this;
  502.     }
  503.     /**
  504.      * @return Collection|Trainee[]
  505.      */
  506.     public function getTraineesFavorites(): Collection
  507.     {
  508.         return $this->traineesFavorites;
  509.     }
  510.     public function addTraineesFavorite(Trainee $traineesFavorite): self
  511.     {
  512.         if (!$this->traineesFavorites->contains($traineesFavorite)) {
  513.             $this->traineesFavorites[] = $traineesFavorite;
  514.             $traineesFavorite->addFavorite($this);
  515.         }
  516.         return $this;
  517.     }
  518.     public function removeTraineesFavorite(Trainee $traineesFavorite): self
  519.     {
  520.         if ($this->traineesFavorites->removeElement($traineesFavorite)) {
  521.             $traineesFavorite->removeFavorite($this);
  522.         }
  523.         return $this;
  524.     }
  525.     /**
  526.      * @return Collection|TranslatedCourse[]
  527.      */
  528.     public function getTranslatedContents(): Collection
  529.     {
  530.         return $this->translatedContents;
  531.     }
  532.     public function addTranslatedContent(TranslatedCourse $translatedContent): self
  533.     {
  534.         if (!$this->translatedContents->contains($translatedContent)) {
  535.             $this->translatedContents[] = $translatedContent;
  536.             $translatedContent->setCourse($this);
  537.         }
  538.         return $this;
  539.     }
  540.     public function removeTranslatedContent(TranslatedCourse $translatedContent): self
  541.     {
  542.         if ($this->translatedContents->removeElement($translatedContent)) {
  543.             // set the owning side to null (unless already changed)
  544.             if ($translatedContent->getCourse() === $this) {
  545.                 $translatedContent->setCourse(null);
  546.             }
  547.         }
  548.         return $this;
  549.     }
  550.     public function getToken(): ?string
  551.     {
  552.         return $this->token;
  553.     }
  554.     public function setToken(string $token): self
  555.     {
  556.         $this->token $token;
  557.         return $this;
  558.     }
  559.     
  560.     public function getTranslatedContent($local)
  561.     {
  562.         foreach($this->translatedContents as $translatedCourse)
  563.         {
  564.             if($translatedCourse->getLanguage() == $local)
  565.             {
  566.                 return $translatedCourse;
  567.             }
  568.         }
  569.         foreach($this->translatedContents as $translatedCourse)
  570.         {
  571.             if($translatedCourse->getLanguage() == 'en')
  572.             {
  573.                 return $translatedCourse;
  574.             }
  575.         }
  576.         return $this->getTranslatedContents()->first() ?? null;
  577.     }
  578.     /**
  579.      * @return Collection|Booking[]
  580.      */
  581.     public function getBookings(): Collection
  582.     {
  583.         return $this->bookings;
  584.     }
  585.     public function addBooking(Booking $booking): self
  586.     {
  587.         if (!$this->bookings->contains($booking)) {
  588.             $this->bookings[] = $booking;
  589.             $booking->setCourse($this);
  590.         }
  591.         return $this;
  592.     }
  593.     public function removeBooking(Booking $booking): self
  594.     {
  595.         if ($this->bookings->removeElement($booking)) {
  596.             // set the owning side to null (unless already changed)
  597.             if ($booking->getCourse() === $this) {
  598.                 $booking->setCourse(null);
  599.             }
  600.         }
  601.         return $this;
  602.     }
  603.     public function getCountryCode(): ?string
  604.     {
  605.         return $this->countryCode;
  606.     }
  607.     public function setCountryCode(string $countryCode): self
  608.     {
  609.         $this->countryCode $countryCode;
  610.         return $this;
  611.     }
  612.     public function getLatitude(): ?float
  613.     {
  614.         return $this->latitude;
  615.     }
  616.     public function setLatitude(?float $latitude): self
  617.     {
  618.         $this->latitude $latitude;
  619.         return $this;
  620.     }
  621.     public function getLongitude(): ?float
  622.     {
  623.         return $this->longitude;
  624.     }
  625.     public function setLongitude(?float $longitude): self
  626.     {
  627.         $this->longitude $longitude;
  628.         return $this;
  629.     }
  630.     /**
  631.      * @return Collection|CourseViewsStat[]
  632.      */
  633.     public function getCourseViewsStats(): Collection
  634.     {
  635.         return $this->courseViewsStats;
  636.     }
  637.     public function addCourseViewsStat(CourseViewsStat $courseViewsStat): self
  638.     {
  639.         if (!$this->courseViewsStats->contains($courseViewsStat)) {
  640.             $this->courseViewsStats[] = $courseViewsStat;
  641.             $courseViewsStat->setCourse($this);
  642.         }
  643.         return $this;
  644.     }
  645.     public function removeCourseViewsStat(CourseViewsStat $courseViewsStat): self
  646.     {
  647.         if ($this->courseViewsStats->removeElement($courseViewsStat)) {
  648.             // set the owning side to null (unless already changed)
  649.             if ($courseViewsStat->getCourse() === $this) {
  650.                 $courseViewsStat->setCourse(null);
  651.             }
  652.         }
  653.         return $this;
  654.     }
  655.     public function getHideClubInfo(): ?bool
  656.     {
  657.         return $this->hideClubInfo;
  658.     }
  659.     public function setHideClubInfo(bool $hideClubInfo): self
  660.     {
  661.         $this->hideClubInfo $hideClubInfo;
  662.         return $this;
  663.     }
  664.     public function getHideCoachInfo(): ?bool
  665.     {
  666.         return $this->hideCoachInfo;
  667.     }
  668.     public function setHideCoachInfo(bool $hideCoachInfo): self
  669.     {
  670.         $this->hideCoachInfo $hideCoachInfo;
  671.         return $this;
  672.     }
  673.     public function getStepSaved(): ?int
  674.     {
  675.         return $this->stepSaved;
  676.     }
  677.     public function setStepSaved(?int $stepSaved): self
  678.     {
  679.         $this->stepSaved $stepSaved;
  680.         return $this;
  681.     }
  682.     /**
  683.      * @return Collection<int, CoachInfo>
  684.      */
  685.     public function getCoachsInfos(): Collection
  686.     {
  687.         return $this->coachsInfos;
  688.     }
  689.     public function addCoachsInfo(CoachInfo $coachsInfo): self
  690.     {
  691.         if (!$this->coachsInfos->contains($coachsInfo)) {
  692.             $this->coachsInfos[] = $coachsInfo;
  693.         }
  694.         return $this;
  695.     }
  696.     public function removeCoachsInfo(CoachInfo $coachsInfo): self
  697.     {
  698.         $this->coachsInfos->removeElement($coachsInfo);
  699.         return $this;
  700.     }
  701.     public function getSendedAlert(): ?bool
  702.     {
  703.         return $this->sendedAlert;
  704.     }
  705.     public function setSendedAlert(?bool $sendedAlert): self
  706.     {
  707.         $this->sendedAlert $sendedAlert;
  708.         return $this;
  709.     }
  710.     public function getCover()
  711.     {
  712.         return $this->cover;
  713.     }
  714.     public function setCover($cover): static
  715.     {
  716.         $this->cover $cover;
  717.         return $this;
  718.     }
  719.     /**
  720.      * @return Collection<int, PriceBundle>
  721.      */
  722.     public function getPriceBundles(): Collection
  723.     {
  724.         return $this->priceBundles;
  725.     }
  726.     public function addPriceBundle(PriceBundle $priceBundle): static
  727.     {
  728.         if (!$this->priceBundles->contains($priceBundle)) {
  729.             $this->priceBundles->add($priceBundle);
  730.             $priceBundle->setCourse($this);
  731.         }
  732.         return $this;
  733.     }
  734.     public function removePriceBundle(PriceBundle $priceBundle): static
  735.     {
  736.         if ($this->priceBundles->removeElement($priceBundle)) {
  737.             // set the owning side to null (unless already changed)
  738.             if ($priceBundle->getCourse() === $this) {
  739.                 $priceBundle->setCourse(null);
  740.             }
  741.         }
  742.         return $this;
  743.     }
  744.     /**
  745.      * Get the value of translateName
  746.      */ 
  747.     public function getTranslateName()
  748.     {
  749.         return $this->translateName;
  750.     }
  751.     /**
  752.      * Set the value of translateName
  753.      *
  754.      * @return  self
  755.      */ 
  756.     public function setTranslateName($translateName)
  757.     {
  758.         $this->translateName $translateName;
  759.         return $this;
  760.     }
  761.     /**
  762.      * Get the value of translateDescription
  763.      */ 
  764.     public function getTranslateDescription()
  765.     {
  766.         return $this->translateDescription;
  767.     }
  768.     /**
  769.      * Set the value of translateDescription
  770.      *
  771.      * @return  self
  772.      */ 
  773.     public function setTranslateDescription($translateDescription)
  774.     {
  775.         $this->translateDescription $translateDescription;
  776.         return $this;
  777.     }
  778.     /**
  779.      * Get the value of translatePlanning
  780.      */ 
  781.     public function getTranslatePlanning()
  782.     {
  783.         return $this->translatePlanning;
  784.     }
  785.     /**
  786.      * Set the value of translatePlanning
  787.      *
  788.      * @return  self
  789.      */ 
  790.     public function setTranslatePlanning($translatePlanning)
  791.     {
  792.         $this->translatePlanning $translatePlanning;
  793.         return $this;
  794.     }
  795.     /**
  796.      * Get the value of translateOther
  797.      */ 
  798.     public function getTranslateOther()
  799.     {
  800.         return $this->translateOther;
  801.     }
  802.     /**
  803.      * Set the value of translateOther
  804.      *
  805.      * @return  self
  806.      */ 
  807.     public function setTranslateOther($translateOther)
  808.     {
  809.         $this->translateOther $translateOther;
  810.         return $this;
  811.     }
  812.     public function isVisibleToClub(): ?bool
  813.     {
  814.         return $this->visibleToClub;
  815.     }
  816.     public function setVisibleToClub(?bool $visibleToClub): static
  817.     {
  818.         $this->visibleToClub $visibleToClub;
  819.         return $this;
  820.     }
  821.     public function isVisibleToCoach(): ?bool
  822.     {
  823.         return $this->visibleToCoach;
  824.     }
  825.     public function setVisibleToCoach(?bool $visibleToCoach): static
  826.     {
  827.         $this->visibleToCoach $visibleToCoach;
  828.         return $this;
  829.     }
  830.     public function isVisibleToOperator(): ?bool
  831.     {
  832.         return $this->visibleToOperator;
  833.     }
  834.     public function setVisibleToOperator(?bool $visibleToOperator): static
  835.     {
  836.         $this->visibleToOperator $visibleToOperator;
  837.         return $this;
  838.     }
  839.     public function getPublishedAt(): ?\DateTimeInterface
  840.     {
  841.         return $this->publishedAt;
  842.     }
  843.     public function setPublishedAt(?\DateTimeInterface $publishedAt): static
  844.     {
  845.         $this->publishedAt $publishedAt;
  846.         return $this;
  847.     }
  848.     public function getUpdatedAt(): ?\DateTimeInterface
  849.     {
  850.         return $this->updatedAt;
  851.     }
  852.     public function setUpdatedAt(?\DateTimeInterface $updatedAt): static
  853.     {
  854.         $this->updatedAt $updatedAt;
  855.         return $this;
  856.     }
  857.     public function getOperator(): ?OperatorInfo
  858.     {
  859.         return $this->operator;
  860.     }
  861.     public function setOperator(?OperatorInfo $operator): static
  862.     {
  863.         $this->operator $operator;
  864.         return $this;
  865.     }
  866.     /**
  867.      * @return Collection<int, NoteRequest>
  868.      */
  869.     public function getNoteRequests(): Collection
  870.     {
  871.         return $this->noteRequests;
  872.     }
  873.     public function addNoteRequest(NoteRequest $noteRequest): static
  874.     {
  875.         if (!$this->noteRequests->contains($noteRequest)) {
  876.             $this->noteRequests->add($noteRequest);
  877.             $noteRequest->setCourse($this);
  878.         }
  879.         return $this;
  880.     }
  881.     public function removeNoteRequest(NoteRequest $noteRequest): static
  882.     {
  883.         if ($this->noteRequests->removeElement($noteRequest)) {
  884.             // set the owning side to null (unless already changed)
  885.             if ($noteRequest->getCourse() === $this) {
  886.                 $noteRequest->setCourse(null);
  887.             }
  888.         }
  889.         return $this;
  890.     }
  891.     /**
  892.      * @return Collection<int, Note>
  893.      */
  894.     public function getNotes(): Collection
  895.     {
  896.         return $this->notes;
  897.     }
  898.     public function addNote(Note $note): static
  899.     {
  900.         if (!$this->notes->contains($note)) {
  901.             $this->notes->add($note);
  902.             $note->setCourse($this);
  903.         }
  904.         return $this;
  905.     }
  906.     public function removeNote(Note $note): static
  907.     {
  908.         if ($this->notes->removeElement($note)) {
  909.             // set the owning side to null (unless already changed)
  910.             if ($note->getCourse() === $this) {
  911.                 $note->setCourse(null);
  912.             }
  913.         }
  914.         return $this;
  915.     }
  916. }