FOS\UserBundle\Model\User::removeGroup PHP Method

removeGroup() public method

Remove a group from the user groups
public removeGroup ( FOS\UserBundle\Model\GroupInterface $group ) : null
$group FOS\UserBundle\Model\GroupInterface
return null
    public function removeGroup(GroupInterface $group)
    {
        if ($this->getGroups()->contains($group)) {
            $this->getGroups()->remove($group);
        }
    }

Usage Example

コード例 #1
0
ファイル: User.php プロジェクト: harijoe/cheerup
 public function removeSecurityGroup(GroupInterface $group)
 {
     return parent::removeGroup($group);
 }