<?php
namespace App\Entity;
use App\Repository\LieuxJobsRepository;
use Doctrine\Common\Collections\ArrayCollection;
use Doctrine\Common\Collections\Collection;
use Doctrine\ORM\Mapping as ORM;
/**
* @ORM\Entity(repositoryClass=LieuxJobsRepository::class)
*/
class LieuxJobs
{
/**
* @ORM\Id
* @ORM\GeneratedValue
* @ORM\Column(type="integer")
*/
private $id;
/**
* @ORM\Column(type="string", length=255, nullable=true)
*/
private $TitreFr;
/**
* @ORM\Column(type="string", length=255, nullable=true)
*/
private $TitreEn;
/**
* @ORM\OneToMany(targetEntity=Jobs::class, mappedBy="LieuxJobs")
*/
private $jobs;
public function __toString(){
return $this->TitreFr;
}
public function __construct()
{
$this->jobs = new ArrayCollection();
}
public function getId(): ?int
{
return $this->id;
}
public function getTitreFr(): ?string
{
return $this->TitreFr;
}
public function setTitreFr(?string $TitreFr): self
{
$this->TitreFr = $TitreFr;
return $this;
}
public function getTitreEn(): ?string
{
return $this->TitreEn;
}
public function setTitreEn(?string $TitreEn): self
{
$this->TitreEn = $TitreEn;
return $this;
}
/**
* @return Collection<int, Jobs>
*/
public function getJobs(): Collection
{
return $this->jobs;
}
public function addJob(Jobs $job): self
{
if (!$this->jobs->contains($job)) {
$this->jobs[] = $job;
$job->setLieuxJobs($this);
}
return $this;
}
public function removeJob(Jobs $job): self
{
if ($this->jobs->removeElement($job)) {
// set the owning side to null (unless already changed)
if ($job->getLieuxJobs() === $this) {
$job->setLieuxJobs(null);
}
}
return $this;
}
}