FOS\UserBundle\Model\GroupInterface::getRoles PHP Method

getRoles() public method

public getRoles ( )
    function getRoles();

Usage Example

Beispiel #1
0
 public function addGroup(GroupInterface $group)
 {
     if (!in_array($group->getRoles(), $this->getRoles())) {
         $this->addRole($group->getRoles());
     }
     if (!$this->getGroups()->contains($group)) {
         $this->getGroups()->add($group);
     }
     return $this;
 }