Skip to content

Instantly share code, notes, and snippets.

View Brammm's full-sized avatar

Bram Van der Sype Brammm

View GitHub Profile
anonymous
anonymous / gist:6008688
Created July 16, 2013 13:29
// in User entity:
public function addRole(Role $roles) {
$this->roles[] = $roles;
return $this;
}
public function removeRole(Role $roles) {
$this->roles->removeElement($roles);
}