<?phpnamespace App\Entity\Referentiel;use Doctrine\ORM\Mapping as ORM;/** * @ORM\Entity * @ORM\Table(name="efc.ref_canton") */class Canton {// <editor-fold defaultstate="collapsed" desc="Attributs privés"> /** * @ORM\Column(type="integer") * @ORM\Id * @ORM\GeneratedValue(strategy="IDENTITY") */ private $id; /** * @ORM\Column(type="string", length=70) */ private $code_externe; /** * @ORM\Column(type="string", length=100) */ private $libelle; /** * @ORM\ManyToMany(targetEntity="App\Entity\Referentiel\Commune", mappedBy="cantons") */ private $communes; /** * @ORM\OneToMany(targetEntity="App\Entity\AssistantMaternel\AssistantMaternel", mappedBy="canton") */ private $assmats; /** * @ORM\OneToMany(targetEntity="App\Entity\MAM\MAM", mappedBy="canton") */ private $mams;// </editor-fold>// <editor-fold desc="Accesseurs">// /** * Get id * * @return integer */ public function getId() { return $this->id; } /** * Set codeExterne * * @param integer $codeExterne * * @return Canton */ public function setCodeExterne($codeExterne) { $this->code_externe = $codeExterne; return $this; } /** * Get codeExterne * * @return integer */ public function getCodeExterne() { return $this->code_externe; } /** * Set libelle * * @param string $libelle * * @return SecteurPmi */ public function setLibelle($libelle) { $this->libelle = $libelle; return $this; } /** * Get libelle * * @return string */ public function getLibelle() { return $this->libelle; } /** * Get communes * * @return \Doctrine\Common\Collections\Collection */ public function getCommunes() { return $this->communes; }// </editor-fold>// <editor-fold desc="Méthodes publiques"> /** * Constructor */ public function __construct() { } /** * Add commune * * @param Commune $commune * * @return Canton */ public function addCommune(Commune $commune) { $this->communes[] = $commune; return $this; } /** * Remove commune * * @param Commune $commune */ public function removeCommune(Commune $commune) { $this->communes->removeElement($commune); }// </editor-fold>}