src/Kunstmaan/AdminBundle/Entity/GroupPropertiesTrait.php
public function removeRole($role)
    {
        $roleElement = $this->getRole($role);
        if ($roleElement) {
            $this->roles->removeElement($roleElement);
        }

        return $this;
    }
public function removeRole($role)
    {
        $roleElement = $this->getRole($role);
        if ($roleElement) {
            $this->roles->removeElement($roleElement);
        }

        return $this;
    }
public function removeRole ( $ role ) { $ roleElement = $ this -> getRole ( $ role ) ; if ( $ roleElement ) { $ this -> roles -> removeElement ( $ roleElement ) ; } return $ this ; }
Pass a string, remove the Role object from collection.

@param string $role

@return GroupInterface
Pass a string remove the Role object from collection .