PHP Class Devise\Users\Groups\GroupsRepository

Show file Open project: devisephp/cms

Protected Properties

Property Type Description
$Group
$User

Public Methods

Method Description
__construct ( DvsGroup $Group, DvsUser $User )
findById ( integer $id ) : DvsGroup Find group by id
findByName ( string $name ) : DvsGroup Find group by name
groupList ( ) : array List all the groups
groupListForUser ( integer $userId ) : array Get a list of groups for the given user id
groups ( ) : Eloquent\Collection Paginated list of groups

Method Details

__construct() public method

public __construct ( DvsGroup $Group, DvsUser $User )
$Group DvsGroup
$User DvsUser

findById() public method

Find group by id
public findById ( integer $id ) : DvsGroup
$id integer
return DvsGroup

findByName() public method

Find group by name
public findByName ( string $name ) : DvsGroup
$name string
return DvsGroup

groupList() public method

List all the groups
public groupList ( ) : array
return array

groupListForUser() public method

Get a list of groups for the given user id
public groupListForUser ( integer $userId ) : array
$userId integer
return array

groups() public method

Paginated list of groups
public groups ( ) : Eloquent\Collection
return Eloquent\Collection

Property Details

$Group protected property

protected $Group

$User protected property

protected $User