src/Entity/Language.php line 14

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use Doctrine\Common\Collections\ArrayCollection;
  4. use Doctrine\Common\Collections\Collection;
  5. use Doctrine\DBAL\Types\Types;
  6. use Doctrine\ORM\Mapping as ORM;
  7. /**
  8.  * @ORM\Table(name="fs_language")
  9.  * @ORM\Entity
  10.  */
  11. class Language
  12. {
  13.     public function __toString(){
  14.         return $this->sign;
  15.     }
  16.     /**
  17.      * @ORM\Column(name="id", type="bigint")
  18.      * @ORM\Id
  19.      * @ORM\GeneratedValue(strategy="AUTO")
  20.      */
  21.     protected $id;
  22.     
  23.     /**
  24.      * @ORM\Column(name="name", type="string")
  25.      */
  26.     protected $name;
  27.     
  28.     /**
  29.      * @ORM\Column(name="sign", type="string")
  30.      */
  31.     protected $sign;
  32.             
  33.     // ONE TO MANY
  34.         /**
  35.          * @ORM\OneToMany(targetEntity="App\Entity\BaseDetailTranslation", mappedBy="language")
  36.          */
  37.         private $baseDetail;
  38.         /**
  39.          * @ORM\OneToMany(targetEntity="App\Entity\BaseDetailCategoryTranslation", mappedBy="language")
  40.          */
  41.         private $baseDetailCategories;
  42.         /**
  43.          * @ORM\OneToMany(targetEntity="App\Entity\BoatTranslation", mappedBy="language")
  44.          */
  45.         private $boats;
  46.         /**
  47.          * @ORM\OneToMany(targetEntity="App\Entity\BoatCategoryTranslation", mappedBy="language")
  48.          */
  49.         private $boatCategories;
  50.         /**
  51.          * @ORM\OneToMany(targetEntity="App\Entity\BoatDocumentTranslation", mappedBy="language")
  52.          */
  53.         private $boatDocuments;
  54.         
  55.         /**
  56.          * @ORM\OneToMany(targetEntity="App\Entity\BoatEquipmentTranslation", mappedBy="language")
  57.          */
  58.         private $boatEquipments;
  59.         
  60.         /**
  61.          * @ORM\OneToMany(targetEntity="App\Entity\BoatEquipmentCategoryTranslation", mappedBy="language")
  62.          */
  63.         private $boatEquipmentCategories;
  64.         
  65.         /**
  66.          * @ORM\OneToMany(targetEntity="App\Entity\BoatModelTranslation", mappedBy="language")
  67.          */
  68.         private $boatModels;
  69.         
  70.         /**
  71.          * @ORM\OneToMany(targetEntity="App\Entity\BoatServiceTranslation", mappedBy="language")
  72.          */
  73.         private $boatServices;
  74.         
  75.         /**
  76.          * @ORM\OneToMany(targetEntity="App\Entity\BoatServiceCategoryTranslation", mappedBy="language")
  77.          */
  78.         private $boatServiceCategories;
  79.         /**
  80.          * @ORM\OneToMany(targetEntity="App\Entity\BoatTypeTranslation", mappedBy="language")
  81.          */
  82.         private $boatTypes;
  83.         
  84.         /**
  85.          * @ORM\OneToMany(targetEntity="App\Entity\CountryTranslation", mappedBy="language")
  86.          */
  87.         private $countries;
  88.         /**
  89.          * @ORM\OneToMany(targetEntity="App\Entity\CatalogueTranslation", mappedBy="language")
  90.          */
  91.         private $catalogues;
  92.         
  93.         /**
  94.          * @ORM\OneToMany(targetEntity="App\Entity\FaqTranslation", mappedBy="language")
  95.          */
  96.         private $faqs;
  97.         /**
  98.          * @ORM\OneToMany(targetEntity="App\Entity\FaqCategoryTranslation", mappedBy="language")
  99.          */
  100.         private $faqCategories;
  101.         /**
  102.          * @ORM\OneToMany(targetEntity="App\Entity\HelpTranslation", mappedBy="language")
  103.          */
  104.         private $helps;
  105.         /**
  106.          * @ORM\OneToMany(targetEntity="App\Entity\ReservationRequestTypeTranslation", mappedBy="language")
  107.          */
  108.         private $reservationRequestTypes;
  109.         
  110.         /**
  111.          * @ORM\OneToMany(targetEntity="App\Entity\ReservationTypeTranslation", mappedBy="language")
  112.          */
  113.         private $reservationTypes;
  114.         
  115.         /**
  116.          * @ORM\OneToMany(targetEntity="App\Entity\TutorialTranslation", mappedBy="language")
  117.          */
  118.         private $tutorials;
  119.         
  120.         /**
  121.          * @ORM\OneToMany(targetEntity="App\Entity\TutorialCategoryTranslation", mappedBy="language")
  122.          */
  123.         private $tutorialCategories;
  124.     //
  125.     // MANY TO MANY
  126.         /**
  127.          * @ORM\ManyToMany(targetEntity="App\Entity\Dealer", mappedBy="languages")
  128.          */
  129.         private $dealers;
  130.         public function __construct()
  131.         {
  132.             $this->baseDetail = new ArrayCollection();
  133.             $this->baseDetailCategories = new ArrayCollection();
  134.             $this->boats = new ArrayCollection();
  135.             $this->boatCategories = new ArrayCollection();
  136.             $this->boatDocuments = new ArrayCollection();
  137.             $this->boatEquipments = new ArrayCollection();
  138.             $this->boatEquipmentCategories = new ArrayCollection();
  139.             $this->boatModels = new ArrayCollection();
  140.             $this->boatServices = new ArrayCollection();
  141.             $this->boatServiceCategories = new ArrayCollection();
  142.             $this->boatTypes = new ArrayCollection();
  143.             $this->countries = new ArrayCollection();
  144.             $this->catalogues = new ArrayCollection();
  145.             $this->faqs = new ArrayCollection();
  146.             $this->faqCategories = new ArrayCollection();
  147.             $this->helps = new ArrayCollection();
  148.             $this->reservationRequestTypes = new ArrayCollection();
  149.             $this->reservationTypes = new ArrayCollection();
  150.             $this->tutorials = new ArrayCollection();
  151.             $this->tutorialCategories = new ArrayCollection();
  152.             $this->dealers = new ArrayCollection();
  153.         }
  154.     //
  155.     public function getId(): ?string
  156.     {
  157.         return $this->id;
  158.     }
  159.     public function getName(): ?string
  160.     {
  161.         return $this->name;
  162.     }
  163.     public function setName(string $name): static
  164.     {
  165.         $this->name $name;
  166.         return $this;
  167.     }
  168.     public function getSign(): ?string
  169.     {
  170.         return $this->sign;
  171.     }
  172.     public function setSign(string $sign): static
  173.     {
  174.         $this->sign $sign;
  175.         return $this;
  176.     }
  177.     /**
  178.      * @return Collection<int, BaseDetailTranslation>
  179.      */
  180.     public function getBaseDetail(): Collection
  181.     {
  182.         return $this->baseDetail;
  183.     }
  184.     public function addBaseDetail(BaseDetailTranslation $baseDetail): static
  185.     {
  186.         if (!$this->baseDetail->contains($baseDetail)) {
  187.             $this->baseDetail->add($baseDetail);
  188.             $baseDetail->setLanguage($this);
  189.         }
  190.         return $this;
  191.     }
  192.     public function removeBaseDetail(BaseDetailTranslation $baseDetail): static
  193.     {
  194.         if ($this->baseDetail->removeElement($baseDetail)) {
  195.             // set the owning side to null (unless already changed)
  196.             if ($baseDetail->getLanguage() === $this) {
  197.                 $baseDetail->setLanguage(null);
  198.             }
  199.         }
  200.         return $this;
  201.     }
  202.     /**
  203.      * @return Collection<int, BaseDetailCategoryTranslation>
  204.      */
  205.     public function getBaseDetailCategories(): Collection
  206.     {
  207.         return $this->baseDetailCategories;
  208.     }
  209.     public function addBaseDetailCategory(BaseDetailCategoryTranslation $baseDetailCategory): static
  210.     {
  211.         if (!$this->baseDetailCategories->contains($baseDetailCategory)) {
  212.             $this->baseDetailCategories->add($baseDetailCategory);
  213.             $baseDetailCategory->setLanguage($this);
  214.         }
  215.         return $this;
  216.     }
  217.     public function removeBaseDetailCategory(BaseDetailCategoryTranslation $baseDetailCategory): static
  218.     {
  219.         if ($this->baseDetailCategories->removeElement($baseDetailCategory)) {
  220.             // set the owning side to null (unless already changed)
  221.             if ($baseDetailCategory->getLanguage() === $this) {
  222.                 $baseDetailCategory->setLanguage(null);
  223.             }
  224.         }
  225.         return $this;
  226.     }
  227.     /**
  228.      * @return Collection<int, BoatTranslation>
  229.      */
  230.     public function getBoats(): Collection
  231.     {
  232.         return $this->boats;
  233.     }
  234.     public function addBoat(BoatTranslation $boat): static
  235.     {
  236.         if (!$this->boats->contains($boat)) {
  237.             $this->boats->add($boat);
  238.             $boat->setLanguage($this);
  239.         }
  240.         return $this;
  241.     }
  242.     public function removeBoat(BoatTranslation $boat): static
  243.     {
  244.         if ($this->boats->removeElement($boat)) {
  245.             // set the owning side to null (unless already changed)
  246.             if ($boat->getLanguage() === $this) {
  247.                 $boat->setLanguage(null);
  248.             }
  249.         }
  250.         return $this;
  251.     }
  252.     /**
  253.      * @return Collection<int, BoatCategoryTranslation>
  254.      */
  255.     public function getBoatCategories(): Collection
  256.     {
  257.         return $this->boatCategories;
  258.     }
  259.     public function addBoatCategory(BoatCategoryTranslation $boatCategory): static
  260.     {
  261.         if (!$this->boatCategories->contains($boatCategory)) {
  262.             $this->boatCategories->add($boatCategory);
  263.             $boatCategory->setLanguage($this);
  264.         }
  265.         return $this;
  266.     }
  267.     public function removeBoatCategory(BoatCategoryTranslation $boatCategory): static
  268.     {
  269.         if ($this->boatCategories->removeElement($boatCategory)) {
  270.             // set the owning side to null (unless already changed)
  271.             if ($boatCategory->getLanguage() === $this) {
  272.                 $boatCategory->setLanguage(null);
  273.             }
  274.         }
  275.         return $this;
  276.     }
  277.     /**
  278.      * @return Collection<int, BoatDocumentTranslation>
  279.      */
  280.     public function getBoatDocuments(): Collection
  281.     {
  282.         return $this->boatDocuments;
  283.     }
  284.     public function addBoatDocument(BoatDocumentTranslation $boatDocument): static
  285.     {
  286.         if (!$this->boatDocuments->contains($boatDocument)) {
  287.             $this->boatDocuments->add($boatDocument);
  288.             $boatDocument->setLanguage($this);
  289.         }
  290.         return $this;
  291.     }
  292.     public function removeBoatDocument(BoatDocumentTranslation $boatDocument): static
  293.     {
  294.         if ($this->boatDocuments->removeElement($boatDocument)) {
  295.             // set the owning side to null (unless already changed)
  296.             if ($boatDocument->getLanguage() === $this) {
  297.                 $boatDocument->setLanguage(null);
  298.             }
  299.         }
  300.         return $this;
  301.     }
  302.     /**
  303.      * @return Collection<int, BoatEquipmentTranslation>
  304.      */
  305.     public function getBoatEquipments(): Collection
  306.     {
  307.         return $this->boatEquipments;
  308.     }
  309.     public function addBoatEquipment(BoatEquipmentTranslation $boatEquipment): static
  310.     {
  311.         if (!$this->boatEquipments->contains($boatEquipment)) {
  312.             $this->boatEquipments->add($boatEquipment);
  313.             $boatEquipment->setLanguage($this);
  314.         }
  315.         return $this;
  316.     }
  317.     public function removeBoatEquipment(BoatEquipmentTranslation $boatEquipment): static
  318.     {
  319.         if ($this->boatEquipments->removeElement($boatEquipment)) {
  320.             // set the owning side to null (unless already changed)
  321.             if ($boatEquipment->getLanguage() === $this) {
  322.                 $boatEquipment->setLanguage(null);
  323.             }
  324.         }
  325.         return $this;
  326.     }
  327.     /**
  328.      * @return Collection<int, BoatEquipmentCategoryTranslation>
  329.      */
  330.     public function getBoatEquipmentCategories(): Collection
  331.     {
  332.         return $this->boatEquipmentCategories;
  333.     }
  334.     public function addBoatEquipmentCategory(BoatEquipmentCategoryTranslation $boatEquipmentCategory): static
  335.     {
  336.         if (!$this->boatEquipmentCategories->contains($boatEquipmentCategory)) {
  337.             $this->boatEquipmentCategories->add($boatEquipmentCategory);
  338.             $boatEquipmentCategory->setLanguage($this);
  339.         }
  340.         return $this;
  341.     }
  342.     public function removeBoatEquipmentCategory(BoatEquipmentCategoryTranslation $boatEquipmentCategory): static
  343.     {
  344.         if ($this->boatEquipmentCategories->removeElement($boatEquipmentCategory)) {
  345.             // set the owning side to null (unless already changed)
  346.             if ($boatEquipmentCategory->getLanguage() === $this) {
  347.                 $boatEquipmentCategory->setLanguage(null);
  348.             }
  349.         }
  350.         return $this;
  351.     }
  352.     /**
  353.      * @return Collection<int, BoatModelTranslation>
  354.      */
  355.     public function getBoatModels(): Collection
  356.     {
  357.         return $this->boatModels;
  358.     }
  359.     public function addBoatModel(BoatModelTranslation $boatModel): static
  360.     {
  361.         if (!$this->boatModels->contains($boatModel)) {
  362.             $this->boatModels->add($boatModel);
  363.             $boatModel->setLanguage($this);
  364.         }
  365.         return $this;
  366.     }
  367.     public function removeBoatModel(BoatModelTranslation $boatModel): static
  368.     {
  369.         if ($this->boatModels->removeElement($boatModel)) {
  370.             // set the owning side to null (unless already changed)
  371.             if ($boatModel->getLanguage() === $this) {
  372.                 $boatModel->setLanguage(null);
  373.             }
  374.         }
  375.         return $this;
  376.     }
  377.     /**
  378.      * @return Collection<int, BoatServiceTranslation>
  379.      */
  380.     public function getBoatServices(): Collection
  381.     {
  382.         return $this->boatServices;
  383.     }
  384.     public function addBoatService(BoatServiceTranslation $boatService): static
  385.     {
  386.         if (!$this->boatServices->contains($boatService)) {
  387.             $this->boatServices->add($boatService);
  388.             $boatService->setLanguage($this);
  389.         }
  390.         return $this;
  391.     }
  392.     public function removeBoatService(BoatServiceTranslation $boatService): static
  393.     {
  394.         if ($this->boatServices->removeElement($boatService)) {
  395.             // set the owning side to null (unless already changed)
  396.             if ($boatService->getLanguage() === $this) {
  397.                 $boatService->setLanguage(null);
  398.             }
  399.         }
  400.         return $this;
  401.     }
  402.     /**
  403.      * @return Collection<int, BoatServiceCategoryTranslation>
  404.      */
  405.     public function getBoatServiceCategories(): Collection
  406.     {
  407.         return $this->boatServiceCategories;
  408.     }
  409.     public function addBoatServiceCategory(BoatServiceCategoryTranslation $boatServiceCategory): static
  410.     {
  411.         if (!$this->boatServiceCategories->contains($boatServiceCategory)) {
  412.             $this->boatServiceCategories->add($boatServiceCategory);
  413.             $boatServiceCategory->setLanguage($this);
  414.         }
  415.         return $this;
  416.     }
  417.     public function removeBoatServiceCategory(BoatServiceCategoryTranslation $boatServiceCategory): static
  418.     {
  419.         if ($this->boatServiceCategories->removeElement($boatServiceCategory)) {
  420.             // set the owning side to null (unless already changed)
  421.             if ($boatServiceCategory->getLanguage() === $this) {
  422.                 $boatServiceCategory->setLanguage(null);
  423.             }
  424.         }
  425.         return $this;
  426.     }
  427.     /**
  428.      * @return Collection<int, BoatTypeTranslation>
  429.      */
  430.     public function getBoatTypes(): Collection
  431.     {
  432.         return $this->boatTypes;
  433.     }
  434.     public function addBoatType(BoatTypeTranslation $boatType): static
  435.     {
  436.         if (!$this->boatTypes->contains($boatType)) {
  437.             $this->boatTypes->add($boatType);
  438.             $boatType->setLanguage($this);
  439.         }
  440.         return $this;
  441.     }
  442.     public function removeBoatType(BoatTypeTranslation $boatType): static
  443.     {
  444.         if ($this->boatTypes->removeElement($boatType)) {
  445.             // set the owning side to null (unless already changed)
  446.             if ($boatType->getLanguage() === $this) {
  447.                 $boatType->setLanguage(null);
  448.             }
  449.         }
  450.         return $this;
  451.     }
  452.     /**
  453.      * @return Collection<int, CountryTranslation>
  454.      */
  455.     public function getCountries(): Collection
  456.     {
  457.         return $this->countries;
  458.     }
  459.     public function addCountry(CountryTranslation $country): static
  460.     {
  461.         if (!$this->countries->contains($country)) {
  462.             $this->countries->add($country);
  463.             $country->setLanguage($this);
  464.         }
  465.         return $this;
  466.     }
  467.     public function removeCountry(CountryTranslation $country): static
  468.     {
  469.         if ($this->countries->removeElement($country)) {
  470.             // set the owning side to null (unless already changed)
  471.             if ($country->getLanguage() === $this) {
  472.                 $country->setLanguage(null);
  473.             }
  474.         }
  475.         return $this;
  476.     }
  477.     /**
  478.      * @return Collection<int, CatalogueTranslation>
  479.      */
  480.     public function getCatalogues(): Collection
  481.     {
  482.         return $this->catalogues;
  483.     }
  484.     public function addCatalogue(CatalogueTranslation $catalogue): static
  485.     {
  486.         if (!$this->catalogues->contains($catalogue)) {
  487.             $this->catalogues->add($catalogue);
  488.             $catalogue->setLanguage($this);
  489.         }
  490.         return $this;
  491.     }
  492.     public function removeCatalogue(CatalogueTranslation $catalogue): static
  493.     {
  494.         if ($this->catalogues->removeElement($catalogue)) {
  495.             // set the owning side to null (unless already changed)
  496.             if ($catalogue->getLanguage() === $this) {
  497.                 $catalogue->setLanguage(null);
  498.             }
  499.         }
  500.         return $this;
  501.     }
  502.     /**
  503.      * @return Collection<int, FaqTranslation>
  504.      */
  505.     public function getFaqs(): Collection
  506.     {
  507.         return $this->faqs;
  508.     }
  509.     public function addFaq(FaqTranslation $faq): static
  510.     {
  511.         if (!$this->faqs->contains($faq)) {
  512.             $this->faqs->add($faq);
  513.             $faq->setLanguage($this);
  514.         }
  515.         return $this;
  516.     }
  517.     public function removeFaq(FaqTranslation $faq): static
  518.     {
  519.         if ($this->faqs->removeElement($faq)) {
  520.             // set the owning side to null (unless already changed)
  521.             if ($faq->getLanguage() === $this) {
  522.                 $faq->setLanguage(null);
  523.             }
  524.         }
  525.         return $this;
  526.     }
  527.     /**
  528.      * @return Collection<int, FaqCategoryTranslation>
  529.      */
  530.     public function getFaqCategories(): Collection
  531.     {
  532.         return $this->faqCategories;
  533.     }
  534.     public function addFaqCategory(FaqCategoryTranslation $faqCategory): static
  535.     {
  536.         if (!$this->faqCategories->contains($faqCategory)) {
  537.             $this->faqCategories->add($faqCategory);
  538.             $faqCategory->setLanguage($this);
  539.         }
  540.         return $this;
  541.     }
  542.     public function removeFaqCategory(FaqCategoryTranslation $faqCategory): static
  543.     {
  544.         if ($this->faqCategories->removeElement($faqCategory)) {
  545.             // set the owning side to null (unless already changed)
  546.             if ($faqCategory->getLanguage() === $this) {
  547.                 $faqCategory->setLanguage(null);
  548.             }
  549.         }
  550.         return $this;
  551.     }
  552.     /**
  553.      * @return Collection<int, HelpTranslation>
  554.      */
  555.     public function getHelps(): Collection
  556.     {
  557.         return $this->helps;
  558.     }
  559.     public function addHelp(HelpTranslation $help): static
  560.     {
  561.         if (!$this->helps->contains($help)) {
  562.             $this->helps->add($help);
  563.             $help->setLanguage($this);
  564.         }
  565.         return $this;
  566.     }
  567.     public function removeHelp(HelpTranslation $help): static
  568.     {
  569.         if ($this->helps->removeElement($help)) {
  570.             // set the owning side to null (unless already changed)
  571.             if ($help->getLanguage() === $this) {
  572.                 $help->setLanguage(null);
  573.             }
  574.         }
  575.         return $this;
  576.     }
  577.     /**
  578.      * @return Collection<int, ReservationRequestTypeTranslation>
  579.      */
  580.     public function getReservationRequestTypes(): Collection
  581.     {
  582.         return $this->reservationRequestTypes;
  583.     }
  584.     public function addReservationRequestType(ReservationRequestTypeTranslation $reservationRequestType): static
  585.     {
  586.         if (!$this->reservationRequestTypes->contains($reservationRequestType)) {
  587.             $this->reservationRequestTypes->add($reservationRequestType);
  588.             $reservationRequestType->setLanguage($this);
  589.         }
  590.         return $this;
  591.     }
  592.     public function removeReservationRequestType(ReservationRequestTypeTranslation $reservationRequestType): static
  593.     {
  594.         if ($this->reservationRequestTypes->removeElement($reservationRequestType)) {
  595.             // set the owning side to null (unless already changed)
  596.             if ($reservationRequestType->getLanguage() === $this) {
  597.                 $reservationRequestType->setLanguage(null);
  598.             }
  599.         }
  600.         return $this;
  601.     }
  602.     /**
  603.      * @return Collection<int, ReservationTypeTranslation>
  604.      */
  605.     public function getReservationTypes(): Collection
  606.     {
  607.         return $this->reservationTypes;
  608.     }
  609.     public function addReservationType(ReservationTypeTranslation $reservationType): static
  610.     {
  611.         if (!$this->reservationTypes->contains($reservationType)) {
  612.             $this->reservationTypes->add($reservationType);
  613.             $reservationType->setLanguage($this);
  614.         }
  615.         return $this;
  616.     }
  617.     public function removeReservationType(ReservationTypeTranslation $reservationType): static
  618.     {
  619.         if ($this->reservationTypes->removeElement($reservationType)) {
  620.             // set the owning side to null (unless already changed)
  621.             if ($reservationType->getLanguage() === $this) {
  622.                 $reservationType->setLanguage(null);
  623.             }
  624.         }
  625.         return $this;
  626.     }
  627.     /**
  628.      * @return Collection<int, TutorialTranslation>
  629.      */
  630.     public function getTutorials(): Collection
  631.     {
  632.         return $this->tutorials;
  633.     }
  634.     public function addTutorial(TutorialTranslation $tutorial): static
  635.     {
  636.         if (!$this->tutorials->contains($tutorial)) {
  637.             $this->tutorials->add($tutorial);
  638.             $tutorial->setLanguage($this);
  639.         }
  640.         return $this;
  641.     }
  642.     public function removeTutorial(TutorialTranslation $tutorial): static
  643.     {
  644.         if ($this->tutorials->removeElement($tutorial)) {
  645.             // set the owning side to null (unless already changed)
  646.             if ($tutorial->getLanguage() === $this) {
  647.                 $tutorial->setLanguage(null);
  648.             }
  649.         }
  650.         return $this;
  651.     }
  652.     /**
  653.      * @return Collection<int, TutorialCategoryTranslation>
  654.      */
  655.     public function getTutorialCategories(): Collection
  656.     {
  657.         return $this->tutorialCategories;
  658.     }
  659.     public function addTutorialCategory(TutorialCategoryTranslation $tutorialCategory): static
  660.     {
  661.         if (!$this->tutorialCategories->contains($tutorialCategory)) {
  662.             $this->tutorialCategories->add($tutorialCategory);
  663.             $tutorialCategory->setLanguage($this);
  664.         }
  665.         return $this;
  666.     }
  667.     public function removeTutorialCategory(TutorialCategoryTranslation $tutorialCategory): static
  668.     {
  669.         if ($this->tutorialCategories->removeElement($tutorialCategory)) {
  670.             // set the owning side to null (unless already changed)
  671.             if ($tutorialCategory->getLanguage() === $this) {
  672.                 $tutorialCategory->setLanguage(null);
  673.             }
  674.         }
  675.         return $this;
  676.     }
  677.     /**
  678.      * @return Collection<int, Dealer>
  679.      */
  680.     public function getDealers(): Collection
  681.     {
  682.         return $this->dealers;
  683.     }
  684.     public function addDealer(Dealer $dealer): static
  685.     {
  686.         if (!$this->dealers->contains($dealer)) {
  687.             $this->dealers->add($dealer);
  688.             $dealer->addLanguage($this);
  689.         }
  690.         return $this;
  691.     }
  692.     public function removeDealer(Dealer $dealer): static
  693.     {
  694.         if ($this->dealers->removeElement($dealer)) {
  695.             $dealer->removeLanguage($this);
  696.         }
  697.         return $this;
  698.     }
  699. }