Метод |
Описание |
|
__construct ( User $user, Role $role, EntityRepo $entityRepo ) |
UserRepo constructor. |
|
attachDefaultRole ( $user ) |
Give a user the default role. Used when creating a new user. |
|
create ( array $data ) : User |
Create a new basic instance of user. |
|
destroy ( User $user ) |
Remove the given user from storage, Delete all related content. |
|
getActivity ( User $user, integer $count = 20, integer $page ) : array |
Get the latest activity for a user. |
|
getAllRoles ( ) : mixed |
Get the roles in the system that are assignable to a user. |
|
getAllUsers ( ) : Builder | static |
Get all the users with their permissions. |
|
getAllUsersPaginatedAndSorted ( integer $count = 20, $sortData ) : Builder | static |
Get all the users with their permissions in a paginated format. |
|
getAssetCounts ( User $user ) : array |
Get asset created counts for the give user. |
|
getByEmail ( string $email ) : User | null |
|
|
getById ( integer $id ) : User |
|
|
getRecentlyCreated ( User $user, integer $count = 20 ) : mixed |
Get the recently created content for this given user. |
|
getRestrictableRoles ( ) : mixed |
Get all the roles which can be given restricted access to
other entities in the system. |
|
isOnlyAdmin ( User $user ) : boolean |
Checks if the give user is the only admin. |
|
registerNew ( array $data ) : User |
Creates a new user and attaches a role to them. |
|