PHP Interface Learner\Repositories\UserRepositoryInterface

Afficher le fichier Open project: RryLee/learner.video Interface Usage Examples

Méthodes publiques

Méthode Description
attachRole ( User $user, mixed $roleOrRoleId ) Attach a role to user.
attachRoleById ( integer $userId, array $roleIds ) : User Give user one or more roles.
create ( array $data ) : User Create a new user in the database.
delete ( integer $id ) Delete user from database and remove avatar.
findAllActivePaginated ( integer $perPage = 50 ) : Illuminate\Database\Eloquent\Collection | User[] Find all users paginated.
findNotActivePaginated ( integer $perPage = 50 ) : Illuminate\Database\Eloquent\Collection | User[] Find all not active users paginated.
findTrashedPaginated ( $perPage = 50 ) : Illuminate\Database\Eloquent\Collection | User[] Find all users in trash paginated.
findWithTrashedById ( integer $id ) : User Find user by id with trashed.
getRegisterForm ( ) : Learner\Services\Forms\UserRegisterFormService. Get the user creation form service.
remove ( integer $id ) Remove the user to trash.
restore ( integer $id ) Restore a user from trash.
toggleActive ( integer $id ) : boolean Change user's status.
update ( integer $id, array $attributes ) Update user.

Method Details

attachRole() public méthode

Attach a role to user.
public attachRole ( User $user, mixed $roleOrRoleId )
$user Learner\Models\User
$roleOrRoleId mixed

attachRoleById() public méthode

Give user one or more roles.
public attachRoleById ( integer $userId, array $roleIds ) : User
$userId integer
$roleIds array
Résultat Learner\Models\User

create() public méthode

Create a new user in the database.
public create ( array $data ) : User
$data array
Résultat Learner\Models\User

delete() public méthode

Delete user from database and remove avatar.
public delete ( integer $id )
$id integer

findAllActivePaginated() public méthode

Find all users paginated.
public findAllActivePaginated ( integer $perPage = 50 ) : Illuminate\Database\Eloquent\Collection | User[]
$perPage integer
Résultat Illuminate\Database\Eloquent\Collection | Learner\Models\User[]

findNotActivePaginated() public méthode

Find all not active users paginated.
public findNotActivePaginated ( integer $perPage = 50 ) : Illuminate\Database\Eloquent\Collection | User[]
$perPage integer
Résultat Illuminate\Database\Eloquent\Collection | Learner\Models\User[]

findTrashedPaginated() public méthode

Find all users in trash paginated.
public findTrashedPaginated ( $perPage = 50 ) : Illuminate\Database\Eloquent\Collection | User[]
Résultat Illuminate\Database\Eloquent\Collection | Learner\Models\User[]

findWithTrashedById() public méthode

Find user by id with trashed.
public findWithTrashedById ( integer $id ) : User
$id integer
Résultat Learner\Models\User

getRegisterForm() public méthode

Get the user creation form service.
public getRegisterForm ( ) : Learner\Services\Forms\UserRegisterFormService.
Résultat Learner\Services\Forms\UserRegisterFormService.

remove() public méthode

Remove the user to trash.
public remove ( integer $id )
$id integer

restore() public méthode

Restore a user from trash.
public restore ( integer $id )
$id integer

toggleActive() public méthode

Change user's status.
public toggleActive ( integer $id ) : boolean
$id integer
Résultat boolean

update() public méthode

Update user.
public update ( integer $id, array $attributes )
$id integer
$attributes array