<?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_form_block") */class FormulaireBlock{ /** * @ORM\Id * @ORM\Column(type="integer") * @ORM\GeneratedValue(strategy="AUTO") */ protected $id; /** * @ORM\Column(type="string", length=255) */ protected $name; /** * @ORM\Column(type="string", length=255) */ protected $label; /** * @ORM\Column(type="integer") */ protected $position; /** * @ORM\ManyToMany(targetEntity="Formulaire", inversedBy="blocks") * @ORM\JoinTable(name="mmpp_form_formulaires_blocks", * joinColumns={@ORM\JoinColumn(name="formulaireblock_id", referencedColumnName="id")}, * inverseJoinColumns={@ORM\JoinColumn(name="formulaire_id", referencedColumnName="id")} * ) */ protected $formulaires; /** * @ORM\OneToMany(targetEntity="FormulaireField", mappedBy="block") * @ORM\OrderBy({"position" = "ASC"}) * @var unknown */ protected $fields; /** * Constructor */ public function __construct() { $this->formulaires = new \Doctrine\Common\Collections\ArrayCollection(); $this->fields = new \Doctrine\Common\Collections\ArrayCollection(); } /** * Get id * * @return integer */ public function getId() { return $this->id; } /** * Set name * * @param string $name * @return FormulaireBlock */ public function setName($name) { $this->name = $name; return $this; } /** * Get name * * @return string */ public function getName() { return $this->name; } /** * Set label * * @param string $label * @return FormulaireBlock */ public function setLabel($label) { $this->label = $label; return $this; } /** * Get label * * @return string */ public function getLabel() { return $this->label; } /** * Set position * * @param integer $position * @return FormulaireBlock */ public function setPosition($position) { $this->position = $position; return $this; } /** * Get position * * @return integer */ public function getPosition() { return $this->position; } /** * Add formulaires * * @param \App\Entity\Formulaire $formulaires * @return FormulaireBlock */ public function addFormulaire(\App\Entity\Formulaire $formulaires) { $this->formulaires[] = $formulaires; return $this; } /** * Remove formulaires * * @param \App\Entity\Formulaire $formulaires */ public function removeFormulaire(\App\Entity\Formulaire $formulaires) { $this->formulaires->removeElement($formulaires); } /** * Get formulaires * * @return \Doctrine\Common\Collections\Collection */ public function getFormulaires() { return $this->formulaires; } /** * Add fields * * @param \App\Entity\FormulaireField $fields * @return FormulaireBlock */ public function addField(\App\Entity\FormulaireField $fields) { $this->fields[] = $fields; return $this; } /** * Remove fields * * @param \App\Entity\FormulaireField $fields */ public function removeField(\App\Entity\FormulaireField $fields) { $this->fields->removeElement($fields); } /** * Get fields * * @return \Doctrine\Common\Collections\Collection */ public function getFields() { return $this->fields; }}