Skip to content

Instantly share code, notes, and snippets.

Avatar

Bram Van der Sype Brammm

View GitHub Profile
View gist:6008688
// in User entity:
public function addRole(Role $roles) {
$this->roles[] = $roles;
return $this;
}
public function removeRole(Role $roles) {
$this->roles->removeElement($roles);
}