<?phpnamespace App\Entity;use Doctrine\Common\Collections\ArrayCollection;use Doctrine\Common\Collections\Collection;use Doctrine\ORM\Mapping as ORM;/** * @ORM\Entity * @ORM\Table(name="mmpp_formation_group") * @ORM\Entity(repositoryClass="App\Repository\FormationGroupRepository") */class FormationGroup{ /** * @ORM\Id * @ORM\Column(type="integer") * @ORM\GeneratedValue(strategy="AUTO") */ protected $id; /** * @ORM\Column(type="string", length=255) */ protected $name; /** * @ORM\Column(type="integer") */ protected $position; /** * @ORM\ManyToOne(targetEntity="Center", inversedBy="groups") * @ORM\JoinColumn(name="center_id", referencedColumnName="id") */ protected $center; /** * @ORM\OneToMany(targetEntity="Formation", mappedBy="group") */ protected $formations; /** * Constructor */ public function __construct() { $this->formations = new ArrayCollection(); } /** * Get id * * @return integer */ public function getId() { return $this->id; } /** * Set name * * @param string $name * @return FormationGroup */ public function setName($name) { $this->name = $name; return $this; } /** * Get name * * @return string */ public function getName() { return $this->name; } /** * Set center * * @param \App\Entity\Center $center * @return FormationGroup */ public function setCenter(\App\Entity\Center $center = null) { $this->center = $center; return $this; } /** * Get center * * @return \App\Entity\Center */ public function getCenter() { return $this->center; } /** * Add formations * * @param \App\Entity\Formation $formations * @return FormationGroup */ public function addFormation(\App\Entity\Formation $formations) { $this->formations[] = $formations; return $this; } /** * Remove formations * * @param \App\Entity\Formation $formations */ public function removeFormation(\App\Entity\Formation $formations) { $this->formations->removeElement($formations); } /** * Get formations * * @return \Doctrine\Common\Collections\Collection */ public function getFormations() { return $this->formations; } /** * Set position * * @param integer $position * @return FormationGroup */ public function setPosition($position) { $this->position = $position; return $this; } /** * Get position * * @return integer */ public function getPosition() { return $this->position; }}