FOS\UserBundle\Model\GroupInterface::getRoles PHP 메소드

getRoles() 공개 메소드

public getRoles ( )
    function getRoles();

Usage Example

예제 #1
0
파일: User.php 프로젝트: 2remdou/nicetruc
 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;
 }