src/Entity/Search/SearchEngineParameters.php line 12

Open in your IDE?
  1. <?php
  2. namespace App\Entity\Search;
  3. use Doctrine\Common\Collections\ArrayCollection;
  4. use Doctrine\Common\Collections\Collection;
  5. use Doctrine\ORM\Mapping as ORM;
  6. /**
  7.  * @ORM\Entity(repositoryClass=SearchEngineParametersRepository::class)
  8.  */
  9. class SearchEngineParameters
  10. {
  11.     /**
  12.      * @ORM\Id
  13.      * @ORM\GeneratedValue
  14.      * @ORM\Column(type="integer")
  15.      */
  16.     private $id;
  17.     /**
  18.      * @ORM\OneToMany(targetEntity=SearchIndustry::class, mappedBy="searchEngine",cascade={"persist","remove"})
  19.      */
  20.     private $searchIndustries;
  21.     /**
  22.      * @ORM\OneToMany(targetEntity=SearchCity::class, mappedBy="searchEngine",cascade={"persist","remove"})
  23.      */
  24.     private $searchCities;
  25.     /**
  26.      * @ORM\OneToMany(targetEntity=SearchTechnology::class, mappedBy="searchEngine",cascade={"persist","remove"})
  27.      */
  28.     private $searchTechnologies;
  29.     /**
  30.      * @ORM\OneToMany(targetEntity=SearchAnother::class, mappedBy="searchEngine",cascade={"persist","remove"})
  31.      */
  32.     private $searchAnothers;
  33.     public function __construct()
  34.     {
  35.         $this->searchIndustries = new ArrayCollection();
  36.         $this->searchCities = new ArrayCollection();
  37.         $this->searchTechnologies = new ArrayCollection();
  38.         $this->searchAnothers = new ArrayCollection();
  39.     }
  40.     public function getId(): ?int
  41.     {
  42.         return $this->id;
  43.     }
  44.     /**
  45.      * @return Collection|SearchIndustry[]
  46.      */
  47.     public function getSearchIndustries(): Collection
  48.     {
  49.         return $this->searchIndustries;
  50.     }
  51.     public function addSearchIndustry(?SearchIndustry $searchIndustry): self
  52.     {
  53.         if(is_null($searchIndustry) === false){
  54.             if (!$this->searchIndustries->contains($searchIndustry)) {
  55.                 $this->searchIndustries[] = $searchIndustry;
  56.                 $searchIndustry->setSearchEngine($this);
  57.             }
  58.         }
  59.         return $this;
  60.     }
  61.     public function removeSearchIndustry(SearchIndustry $searchIndustry): self
  62.     {
  63.         if ($this->searchIndustries->removeElement($searchIndustry)) {
  64.             // set the owning side to null (unless already changed)
  65.             if ($searchIndustry->getSearchEngine() === $this) {
  66.                 $searchIndustry->setSearchEngine(null);
  67.             }
  68.         }
  69.         return $this;
  70.     }
  71.     /**
  72.      * @return Collection|SearchCity[]
  73.      */
  74.     public function getSearchCities(): Collection
  75.     {
  76.         return $this->searchCities;
  77.     }
  78.     public function addSearchCity(?SearchCity $searchCity): self
  79.     {
  80.         if(is_null($searchCity) === false){
  81.             if (!$this->searchCities->contains($searchCity)) {
  82.                 $this->searchCities[] = $searchCity;
  83.                 $searchCity->setSearchEngine($this);
  84.             }
  85.         }
  86.         return $this;
  87.     }
  88.     public function removeSearchCity(SearchCity $searchCity): self
  89.     {
  90.         if ($this->searchCities->removeElement($searchCity)) {
  91.             // set the owning side to null (unless already changed)
  92.             if ($searchCity->getSearchEngine() === $this) {
  93.                 $searchCity->setSearchEngine(null);
  94.             }
  95.         }
  96.         return $this;
  97.     }
  98.     /**
  99.      * @return Collection|SearchTechnology[]
  100.      */
  101.     public function getSearchTechnologies(): Collection
  102.     {
  103.         return $this->searchTechnologies;
  104.     }
  105.     public function addSearchTechnology(?SearchTechnology $searchTechnology): self
  106.     {
  107.         if(is_null($searchTechnology) === false){
  108.             if (!$this->searchTechnologies->contains($searchTechnology)) {
  109.                 $this->searchTechnologies[] = $searchTechnology;
  110.                 $searchTechnology->setSearchEngine($this);
  111.             }
  112.         }
  113.         return $this;
  114.     }
  115.     public function removeSearchTechnology(SearchTechnology $searchTechnology): self
  116.     {
  117.         if ($this->searchTechnologies->removeElement($searchTechnology)) {
  118.             // set the owning side to null (unless already changed)
  119.             if ($searchTechnology->getSearchEngine() === $this) {
  120.                 $searchTechnology->setSearchEngine(null);
  121.             }
  122.         }
  123.         return $this;
  124.     }
  125.     /**
  126.      * @return Collection|SearchAnother[]
  127.      */
  128.     public function getSearchAnothers(): Collection
  129.     {
  130.         return $this->searchAnothers;
  131.     }
  132.     public function addSearchAnother(SearchAnother $searchAnother): self
  133.     {
  134.         if (!$this->searchAnothers->contains($searchAnother)) {
  135.             $this->searchAnothers[] = $searchAnother;
  136.             $searchAnother->setSearchEngine($this);
  137.         }
  138.         return $this;
  139.     }
  140.     public function removeSearchAnother(SearchAnother $searchAnother): self
  141.     {
  142.         if ($this->searchAnothers->removeElement($searchAnother)) {
  143.             // set the owning side to null (unless already changed)
  144.             if ($searchAnother->getSearchEngine() === $this) {
  145.                 $searchAnother->setSearchEngine(null);
  146.             }
  147.         }
  148.         return $this;
  149.     }
  150. }