<?php
namespace App\Entity;
use Doctrine\Common\Collections\ArrayCollection;
use Doctrine\Common\Collections\Collection;
use Doctrine\DBAL\Types\Types;
use Doctrine\ORM\Mapping as ORM;
/**
* @ORM\Table(name="fs_language")
* @ORM\Entity
*/
class Language
{
public function __toString(){
return $this->sign;
}
/**
* @ORM\Column(name="id", type="bigint")
* @ORM\Id
* @ORM\GeneratedValue(strategy="AUTO")
*/
protected $id;
/**
* @ORM\Column(name="name", type="string")
*/
protected $name;
/**
* @ORM\Column(name="sign", type="string")
*/
protected $sign;
// ONE TO MANY
/**
* @ORM\OneToMany(targetEntity="App\Entity\BaseDetailTranslation", mappedBy="language")
*/
private $baseDetail;
/**
* @ORM\OneToMany(targetEntity="App\Entity\BaseDetailCategoryTranslation", mappedBy="language")
*/
private $baseDetailCategories;
/**
* @ORM\OneToMany(targetEntity="App\Entity\BoatTranslation", mappedBy="language")
*/
private $boats;
/**
* @ORM\OneToMany(targetEntity="App\Entity\BoatCategoryTranslation", mappedBy="language")
*/
private $boatCategories;
/**
* @ORM\OneToMany(targetEntity="App\Entity\BoatDocumentTranslation", mappedBy="language")
*/
private $boatDocuments;
/**
* @ORM\OneToMany(targetEntity="App\Entity\BoatEquipmentTranslation", mappedBy="language")
*/
private $boatEquipments;
/**
* @ORM\OneToMany(targetEntity="App\Entity\BoatEquipmentCategoryTranslation", mappedBy="language")
*/
private $boatEquipmentCategories;
/**
* @ORM\OneToMany(targetEntity="App\Entity\BoatModelTranslation", mappedBy="language")
*/
private $boatModels;
/**
* @ORM\OneToMany(targetEntity="App\Entity\BoatServiceTranslation", mappedBy="language")
*/
private $boatServices;
/**
* @ORM\OneToMany(targetEntity="App\Entity\BoatServiceCategoryTranslation", mappedBy="language")
*/
private $boatServiceCategories;
/**
* @ORM\OneToMany(targetEntity="App\Entity\BoatTypeTranslation", mappedBy="language")
*/
private $boatTypes;
/**
* @ORM\OneToMany(targetEntity="App\Entity\CountryTranslation", mappedBy="language")
*/
private $countries;
/**
* @ORM\OneToMany(targetEntity="App\Entity\CatalogueTranslation", mappedBy="language")
*/
private $catalogues;
/**
* @ORM\OneToMany(targetEntity="App\Entity\FaqTranslation", mappedBy="language")
*/
private $faqs;
/**
* @ORM\OneToMany(targetEntity="App\Entity\FaqCategoryTranslation", mappedBy="language")
*/
private $faqCategories;
/**
* @ORM\OneToMany(targetEntity="App\Entity\HelpTranslation", mappedBy="language")
*/
private $helps;
/**
* @ORM\OneToMany(targetEntity="App\Entity\ReservationRequestTypeTranslation", mappedBy="language")
*/
private $reservationRequestTypes;
/**
* @ORM\OneToMany(targetEntity="App\Entity\ReservationTypeTranslation", mappedBy="language")
*/
private $reservationTypes;
/**
* @ORM\OneToMany(targetEntity="App\Entity\TutorialTranslation", mappedBy="language")
*/
private $tutorials;
/**
* @ORM\OneToMany(targetEntity="App\Entity\TutorialCategoryTranslation", mappedBy="language")
*/
private $tutorialCategories;
//
// MANY TO MANY
/**
* @ORM\ManyToMany(targetEntity="App\Entity\Dealer", mappedBy="languages")
*/
private $dealers;
public function __construct()
{
$this->baseDetail = new ArrayCollection();
$this->baseDetailCategories = new ArrayCollection();
$this->boats = new ArrayCollection();
$this->boatCategories = new ArrayCollection();
$this->boatDocuments = new ArrayCollection();
$this->boatEquipments = new ArrayCollection();
$this->boatEquipmentCategories = new ArrayCollection();
$this->boatModels = new ArrayCollection();
$this->boatServices = new ArrayCollection();
$this->boatServiceCategories = new ArrayCollection();
$this->boatTypes = new ArrayCollection();
$this->countries = new ArrayCollection();
$this->catalogues = new ArrayCollection();
$this->faqs = new ArrayCollection();
$this->faqCategories = new ArrayCollection();
$this->helps = new ArrayCollection();
$this->reservationRequestTypes = new ArrayCollection();
$this->reservationTypes = new ArrayCollection();
$this->tutorials = new ArrayCollection();
$this->tutorialCategories = new ArrayCollection();
$this->dealers = new ArrayCollection();
}
//
public function getId(): ?string
{
return $this->id;
}
public function getName(): ?string
{
return $this->name;
}
public function setName(string $name): static
{
$this->name = $name;
return $this;
}
public function getSign(): ?string
{
return $this->sign;
}
public function setSign(string $sign): static
{
$this->sign = $sign;
return $this;
}
/**
* @return Collection<int, BaseDetailTranslation>
*/
public function getBaseDetail(): Collection
{
return $this->baseDetail;
}
public function addBaseDetail(BaseDetailTranslation $baseDetail): static
{
if (!$this->baseDetail->contains($baseDetail)) {
$this->baseDetail->add($baseDetail);
$baseDetail->setLanguage($this);
}
return $this;
}
public function removeBaseDetail(BaseDetailTranslation $baseDetail): static
{
if ($this->baseDetail->removeElement($baseDetail)) {
// set the owning side to null (unless already changed)
if ($baseDetail->getLanguage() === $this) {
$baseDetail->setLanguage(null);
}
}
return $this;
}
/**
* @return Collection<int, BaseDetailCategoryTranslation>
*/
public function getBaseDetailCategories(): Collection
{
return $this->baseDetailCategories;
}
public function addBaseDetailCategory(BaseDetailCategoryTranslation $baseDetailCategory): static
{
if (!$this->baseDetailCategories->contains($baseDetailCategory)) {
$this->baseDetailCategories->add($baseDetailCategory);
$baseDetailCategory->setLanguage($this);
}
return $this;
}
public function removeBaseDetailCategory(BaseDetailCategoryTranslation $baseDetailCategory): static
{
if ($this->baseDetailCategories->removeElement($baseDetailCategory)) {
// set the owning side to null (unless already changed)
if ($baseDetailCategory->getLanguage() === $this) {
$baseDetailCategory->setLanguage(null);
}
}
return $this;
}
/**
* @return Collection<int, BoatTranslation>
*/
public function getBoats(): Collection
{
return $this->boats;
}
public function addBoat(BoatTranslation $boat): static
{
if (!$this->boats->contains($boat)) {
$this->boats->add($boat);
$boat->setLanguage($this);
}
return $this;
}
public function removeBoat(BoatTranslation $boat): static
{
if ($this->boats->removeElement($boat)) {
// set the owning side to null (unless already changed)
if ($boat->getLanguage() === $this) {
$boat->setLanguage(null);
}
}
return $this;
}
/**
* @return Collection<int, BoatCategoryTranslation>
*/
public function getBoatCategories(): Collection
{
return $this->boatCategories;
}
public function addBoatCategory(BoatCategoryTranslation $boatCategory): static
{
if (!$this->boatCategories->contains($boatCategory)) {
$this->boatCategories->add($boatCategory);
$boatCategory->setLanguage($this);
}
return $this;
}
public function removeBoatCategory(BoatCategoryTranslation $boatCategory): static
{
if ($this->boatCategories->removeElement($boatCategory)) {
// set the owning side to null (unless already changed)
if ($boatCategory->getLanguage() === $this) {
$boatCategory->setLanguage(null);
}
}
return $this;
}
/**
* @return Collection<int, BoatDocumentTranslation>
*/
public function getBoatDocuments(): Collection
{
return $this->boatDocuments;
}
public function addBoatDocument(BoatDocumentTranslation $boatDocument): static
{
if (!$this->boatDocuments->contains($boatDocument)) {
$this->boatDocuments->add($boatDocument);
$boatDocument->setLanguage($this);
}
return $this;
}
public function removeBoatDocument(BoatDocumentTranslation $boatDocument): static
{
if ($this->boatDocuments->removeElement($boatDocument)) {
// set the owning side to null (unless already changed)
if ($boatDocument->getLanguage() === $this) {
$boatDocument->setLanguage(null);
}
}
return $this;
}
/**
* @return Collection<int, BoatEquipmentTranslation>
*/
public function getBoatEquipments(): Collection
{
return $this->boatEquipments;
}
public function addBoatEquipment(BoatEquipmentTranslation $boatEquipment): static
{
if (!$this->boatEquipments->contains($boatEquipment)) {
$this->boatEquipments->add($boatEquipment);
$boatEquipment->setLanguage($this);
}
return $this;
}
public function removeBoatEquipment(BoatEquipmentTranslation $boatEquipment): static
{
if ($this->boatEquipments->removeElement($boatEquipment)) {
// set the owning side to null (unless already changed)
if ($boatEquipment->getLanguage() === $this) {
$boatEquipment->setLanguage(null);
}
}
return $this;
}
/**
* @return Collection<int, BoatEquipmentCategoryTranslation>
*/
public function getBoatEquipmentCategories(): Collection
{
return $this->boatEquipmentCategories;
}
public function addBoatEquipmentCategory(BoatEquipmentCategoryTranslation $boatEquipmentCategory): static
{
if (!$this->boatEquipmentCategories->contains($boatEquipmentCategory)) {
$this->boatEquipmentCategories->add($boatEquipmentCategory);
$boatEquipmentCategory->setLanguage($this);
}
return $this;
}
public function removeBoatEquipmentCategory(BoatEquipmentCategoryTranslation $boatEquipmentCategory): static
{
if ($this->boatEquipmentCategories->removeElement($boatEquipmentCategory)) {
// set the owning side to null (unless already changed)
if ($boatEquipmentCategory->getLanguage() === $this) {
$boatEquipmentCategory->setLanguage(null);
}
}
return $this;
}
/**
* @return Collection<int, BoatModelTranslation>
*/
public function getBoatModels(): Collection
{
return $this->boatModels;
}
public function addBoatModel(BoatModelTranslation $boatModel): static
{
if (!$this->boatModels->contains($boatModel)) {
$this->boatModels->add($boatModel);
$boatModel->setLanguage($this);
}
return $this;
}
public function removeBoatModel(BoatModelTranslation $boatModel): static
{
if ($this->boatModels->removeElement($boatModel)) {
// set the owning side to null (unless already changed)
if ($boatModel->getLanguage() === $this) {
$boatModel->setLanguage(null);
}
}
return $this;
}
/**
* @return Collection<int, BoatServiceTranslation>
*/
public function getBoatServices(): Collection
{
return $this->boatServices;
}
public function addBoatService(BoatServiceTranslation $boatService): static
{
if (!$this->boatServices->contains($boatService)) {
$this->boatServices->add($boatService);
$boatService->setLanguage($this);
}
return $this;
}
public function removeBoatService(BoatServiceTranslation $boatService): static
{
if ($this->boatServices->removeElement($boatService)) {
// set the owning side to null (unless already changed)
if ($boatService->getLanguage() === $this) {
$boatService->setLanguage(null);
}
}
return $this;
}
/**
* @return Collection<int, BoatServiceCategoryTranslation>
*/
public function getBoatServiceCategories(): Collection
{
return $this->boatServiceCategories;
}
public function addBoatServiceCategory(BoatServiceCategoryTranslation $boatServiceCategory): static
{
if (!$this->boatServiceCategories->contains($boatServiceCategory)) {
$this->boatServiceCategories->add($boatServiceCategory);
$boatServiceCategory->setLanguage($this);
}
return $this;
}
public function removeBoatServiceCategory(BoatServiceCategoryTranslation $boatServiceCategory): static
{
if ($this->boatServiceCategories->removeElement($boatServiceCategory)) {
// set the owning side to null (unless already changed)
if ($boatServiceCategory->getLanguage() === $this) {
$boatServiceCategory->setLanguage(null);
}
}
return $this;
}
/**
* @return Collection<int, BoatTypeTranslation>
*/
public function getBoatTypes(): Collection
{
return $this->boatTypes;
}
public function addBoatType(BoatTypeTranslation $boatType): static
{
if (!$this->boatTypes->contains($boatType)) {
$this->boatTypes->add($boatType);
$boatType->setLanguage($this);
}
return $this;
}
public function removeBoatType(BoatTypeTranslation $boatType): static
{
if ($this->boatTypes->removeElement($boatType)) {
// set the owning side to null (unless already changed)
if ($boatType->getLanguage() === $this) {
$boatType->setLanguage(null);
}
}
return $this;
}
/**
* @return Collection<int, CountryTranslation>
*/
public function getCountries(): Collection
{
return $this->countries;
}
public function addCountry(CountryTranslation $country): static
{
if (!$this->countries->contains($country)) {
$this->countries->add($country);
$country->setLanguage($this);
}
return $this;
}
public function removeCountry(CountryTranslation $country): static
{
if ($this->countries->removeElement($country)) {
// set the owning side to null (unless already changed)
if ($country->getLanguage() === $this) {
$country->setLanguage(null);
}
}
return $this;
}
/**
* @return Collection<int, CatalogueTranslation>
*/
public function getCatalogues(): Collection
{
return $this->catalogues;
}
public function addCatalogue(CatalogueTranslation $catalogue): static
{
if (!$this->catalogues->contains($catalogue)) {
$this->catalogues->add($catalogue);
$catalogue->setLanguage($this);
}
return $this;
}
public function removeCatalogue(CatalogueTranslation $catalogue): static
{
if ($this->catalogues->removeElement($catalogue)) {
// set the owning side to null (unless already changed)
if ($catalogue->getLanguage() === $this) {
$catalogue->setLanguage(null);
}
}
return $this;
}
/**
* @return Collection<int, FaqTranslation>
*/
public function getFaqs(): Collection
{
return $this->faqs;
}
public function addFaq(FaqTranslation $faq): static
{
if (!$this->faqs->contains($faq)) {
$this->faqs->add($faq);
$faq->setLanguage($this);
}
return $this;
}
public function removeFaq(FaqTranslation $faq): static
{
if ($this->faqs->removeElement($faq)) {
// set the owning side to null (unless already changed)
if ($faq->getLanguage() === $this) {
$faq->setLanguage(null);
}
}
return $this;
}
/**
* @return Collection<int, FaqCategoryTranslation>
*/
public function getFaqCategories(): Collection
{
return $this->faqCategories;
}
public function addFaqCategory(FaqCategoryTranslation $faqCategory): static
{
if (!$this->faqCategories->contains($faqCategory)) {
$this->faqCategories->add($faqCategory);
$faqCategory->setLanguage($this);
}
return $this;
}
public function removeFaqCategory(FaqCategoryTranslation $faqCategory): static
{
if ($this->faqCategories->removeElement($faqCategory)) {
// set the owning side to null (unless already changed)
if ($faqCategory->getLanguage() === $this) {
$faqCategory->setLanguage(null);
}
}
return $this;
}
/**
* @return Collection<int, HelpTranslation>
*/
public function getHelps(): Collection
{
return $this->helps;
}
public function addHelp(HelpTranslation $help): static
{
if (!$this->helps->contains($help)) {
$this->helps->add($help);
$help->setLanguage($this);
}
return $this;
}
public function removeHelp(HelpTranslation $help): static
{
if ($this->helps->removeElement($help)) {
// set the owning side to null (unless already changed)
if ($help->getLanguage() === $this) {
$help->setLanguage(null);
}
}
return $this;
}
/**
* @return Collection<int, ReservationRequestTypeTranslation>
*/
public function getReservationRequestTypes(): Collection
{
return $this->reservationRequestTypes;
}
public function addReservationRequestType(ReservationRequestTypeTranslation $reservationRequestType): static
{
if (!$this->reservationRequestTypes->contains($reservationRequestType)) {
$this->reservationRequestTypes->add($reservationRequestType);
$reservationRequestType->setLanguage($this);
}
return $this;
}
public function removeReservationRequestType(ReservationRequestTypeTranslation $reservationRequestType): static
{
if ($this->reservationRequestTypes->removeElement($reservationRequestType)) {
// set the owning side to null (unless already changed)
if ($reservationRequestType->getLanguage() === $this) {
$reservationRequestType->setLanguage(null);
}
}
return $this;
}
/**
* @return Collection<int, ReservationTypeTranslation>
*/
public function getReservationTypes(): Collection
{
return $this->reservationTypes;
}
public function addReservationType(ReservationTypeTranslation $reservationType): static
{
if (!$this->reservationTypes->contains($reservationType)) {
$this->reservationTypes->add($reservationType);
$reservationType->setLanguage($this);
}
return $this;
}
public function removeReservationType(ReservationTypeTranslation $reservationType): static
{
if ($this->reservationTypes->removeElement($reservationType)) {
// set the owning side to null (unless already changed)
if ($reservationType->getLanguage() === $this) {
$reservationType->setLanguage(null);
}
}
return $this;
}
/**
* @return Collection<int, TutorialTranslation>
*/
public function getTutorials(): Collection
{
return $this->tutorials;
}
public function addTutorial(TutorialTranslation $tutorial): static
{
if (!$this->tutorials->contains($tutorial)) {
$this->tutorials->add($tutorial);
$tutorial->setLanguage($this);
}
return $this;
}
public function removeTutorial(TutorialTranslation $tutorial): static
{
if ($this->tutorials->removeElement($tutorial)) {
// set the owning side to null (unless already changed)
if ($tutorial->getLanguage() === $this) {
$tutorial->setLanguage(null);
}
}
return $this;
}
/**
* @return Collection<int, TutorialCategoryTranslation>
*/
public function getTutorialCategories(): Collection
{
return $this->tutorialCategories;
}
public function addTutorialCategory(TutorialCategoryTranslation $tutorialCategory): static
{
if (!$this->tutorialCategories->contains($tutorialCategory)) {
$this->tutorialCategories->add($tutorialCategory);
$tutorialCategory->setLanguage($this);
}
return $this;
}
public function removeTutorialCategory(TutorialCategoryTranslation $tutorialCategory): static
{
if ($this->tutorialCategories->removeElement($tutorialCategory)) {
// set the owning side to null (unless already changed)
if ($tutorialCategory->getLanguage() === $this) {
$tutorialCategory->setLanguage(null);
}
}
return $this;
}
/**
* @return Collection<int, Dealer>
*/
public function getDealers(): Collection
{
return $this->dealers;
}
public function addDealer(Dealer $dealer): static
{
if (!$this->dealers->contains($dealer)) {
$this->dealers->add($dealer);
$dealer->addLanguage($this);
}
return $this;
}
public function removeDealer(Dealer $dealer): static
{
if ($this->dealers->removeElement($dealer)) {
$dealer->removeLanguage($this);
}
return $this;
}
}