src/Platform/SecurityBundle/Entity/Access/RoleAssociation/GroupRoleAssociation.php line 17

Open in your IDE?
  1. <?php
  2. namespace Platform\SecurityBundle\Entity\Access\RoleAssociation;
  3. use Platform\SecurityBundle\Entity\Identity\Group;
  4. use Platform\SecurityBundle\Entity\Access\RoleAssociation;
  5. use Doctrine\ORM\Mapping as ORM;
  6. /**
  7.  * Class GroupRoleAssociation
  8.  * @package Platform\SecurityBundle\Entity\Access\RoleAssociation
  9.  *
  10.  * @ORM\Entity(
  11.  *  repositoryClass = "Platform\SecurityBundle\Doctrine\Access\RoleAssociation\GroupRoleAssociationRepository"
  12.  * )
  13.  */
  14. class GroupRoleAssociation extends RoleAssociation
  15. {
  16.     /**
  17.      * @var Group
  18.      *
  19.      * @ORM\ManyToOne(
  20.      *  targetEntity = "Platform\SecurityBundle\Entity\Identity\Group",
  21.      *  inversedBy = "roles"
  22.      * )
  23.      * @ORM\JoinColumn(
  24.      *  name = "grp",
  25.      *  referencedColumnName = "id",
  26.      *  onDelete = "CASCADE"
  27.      * )
  28.      */
  29.     protected $group;
  30.     /**
  31.      * @return Group
  32.      */
  33.     public function getGroup()
  34.     {
  35.         return $this->group;
  36.     }
  37.     /**
  38.      * @param Group $value
  39.      * @return $this
  40.      */
  41.     public function setGroup(Group $value)
  42.     {
  43.         $this->group $value;
  44.         return $this;
  45.     }
  46. }