*/ #[Groups(['commission_commissionmember', 'commission_list'])] #[ORM\OneToMany(targetEntity: 'AppBundle\Entity\Person\CommissionMember', cascade: ['persist'], mappedBy: 'commission', orphanRemoval: true)] private $commissionMembers; /** * @var ArrayCollection */ #[ORM\ManyToMany(targetEntity: 'AppBundle\Entity\Core\Tagg', cascade: ['persist'], inversedBy: 'commissions')] #[Assert\Valid] #[ORM\JoinTable(name: 'tag_commission', joinColumns: [], inverseJoinColumns: [])] #[ORM\JoinColumn(name: 'commission_id', referencedColumnName: 'id')] #[ORM\JoinColumn(name: 'tag_id', referencedColumnName: 'id')] #[Groups(['commission_tags', 'manage_tags', 'commission_list'])] private $tags; /** * Constructor */ public function __construct() { $this->commissionMembers = new ArrayCollection(); $this->tags = new ArrayCollection(); } /** * Sets id. * * @param int $id * * @return $this */ public function setId($id) { $this->id = $id; return $this; } /** * Gets id. * * @return int */ public function getId() { return $this->id; } /** * Sets name. * * @param string $name * * @return $this */ public function setName($name) { $this->name = $name; return $this; } /** * Gets name. * * @return string */ public function getName() { return $this->name; } /** * Sets type. * * @param string $type * * @return $this */ public function setType($type) { $this->type = $type; return $this; } /** * Gets type. * * @return string */ public function getType() { return $this->type; } /** * Sets description. * * @param string $description * * @return $this */ public function setDescription($description) { $this->description = $description; return $this; } /** * Gets description. * * @return string */ public function getDescription() { return $this->description; } /** * Add commissionMember * * @param \AppBundle\Entity\Person\CommissionMember $commissionMember * * @return Commission */ public function addCommissionMember(\AppBundle\Entity\Person\CommissionMember $commissionMember) { $this->commissionMembers[] = $commissionMember; $commissionMember->setCommission($this); return $this; } /** * Remove commissionMember * * @param \AppBundle\Entity\Person\CommissionMember $commissionMember */ public function removeCommissionMember(\AppBundle\Entity\Person\CommissionMember $commissionMember) { $this->commissionMembers->removeElement($commissionMember); } /** * Get commissionMembers * * @return \Doctrine\Common\Collections\Collection */ public function getCommissionMembers() { return $this->commissionMembers; } /** * Set organization * * @param \AppBundle\Entity\Organization\Organization $organization * * @return Commission */ public function setOrganization(\AppBundle\Entity\Organization\Organization $organization) { $this->organization = $organization; return $this; } /** * Get organization * * @return \AppBundle\Entity\Organization\Organization */ public function getOrganization() { return $this->organization; } /** * Add tag * * @param \AppBundle\Entity\Core\Tagg $tag * * @return Commission */ public function addTag(\AppBundle\Entity\Core\Tagg $tag) { $this->tags[] = $tag; return $this; } /** * Remove tag * * @param \AppBundle\Entity\Core\Tagg $tag */ public function removeTag(\AppBundle\Entity\Core\Tagg $tag) { $this->tags->removeElement($tag); } /** * Get tags * * @return \Doctrine\Common\Collections\Collection */ public function getTags() { return $this->tags; } }