示例#1
0
 public function withUsers($id)
 {
     $group = $this->sentry->findGroupById($id);
     $group['users'] = $this->sentry->findAllUsersInGroup($group)->lists('id');
     $group = $group->toArray();
     $group['permissions'] = $this->permissions->allWithChecked($group['permissions'], 0);
     return $group;
 }
 /**
  * Find the group by ID.
  *
  * @param int $id
  * @return \Cartalyst\Sentry\Groups\GroupInterface $group
  * @throws \Cartalyst\Sentry\Groups\GroupNotFoundException
  * @static 
  */
 public static function findGroupById($id)
 {
     return \Cartalyst\Sentry\Sentry::findGroupById($id);
 }