Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- namespace SeguridadBundle\Entity;
- use FOS\UserBundle\Model\Group as BaseGroup;
- use Doctrine\ORM\Mapping as ORM;
- use Symfony\Component\Validator\Constraints as Assert;
- /**
- * @ORM\Entity
- * @ORM\Table(name="fos_group")
- */
- class Group extends BaseGroup
- {
- /**
- * @ORM\Id
- * @ORM\Column(type="integer")
- * @ORM\GeneratedValue(strategy="AUTO")
- */
- protected $id;
- /**
- * GRUPOS
- * @ORM\OneToMany(targetEntity="SeguridadBundle\Entity\UserGroup", mappedBy="grupo", cascade={"persist", "remove"})
- */
- private $grupos;
- /**
- * Add grupo
- *
- * @param \SeguridadBundle\Entity\UserGroup $grupo
- *
- * @return Group
- */
- public function addGrupo(\SeguridadBundle\Entity\UserGroup $grupo)
- {
- $this->grupos[] = $grupo;
- return $this;
- }
- /**
- * Remove grupo
- *
- * @param \SeguridadBundle\Entity\UserGroup $grupo
- */
- public function removeGrupo(\SeguridadBundle\Entity\UserGroup $grupo)
- {
- $this->grupos->removeElement($grupo);
- }
- /**
- * Get grupos
- *
- * @return \Doctrine\Common\Collections\Collection
- */
- public function getGrupos()
- {
- return $this->grupos;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment