UserPolicy
in package
implements
ResourcePolicyInterface, UserPolicyInterface
Uses
HasPolicyTrait, UserBlockedTrait, UserBannedTrait, UserAvatarTrait
Class UserPolicy.
Tags
Table of Contents
Interfaces
Properties
- $type : string
Methods
- __call() : bool
- approve() : bool
- banUser() : bool
- blockUser() : bool
- create() : bool
- delete() : bool
- deleteOwn() : bool
- editCover() : mixed
- feature() : bool
- getEntityType() : string
- manage() : bool
- unBlockUser() : bool
- update() : bool
- updateSetting() : bool
- uploadAvatar() : bool
- uploadCover() : mixed
- view() : bool
- viewAdminCP() : bool
- viewAny() : bool
- viewLocation() : bool
- viewOnProfilePage() : bool
- viewOwner() : bool
Properties
$type
protected
string
$type
= \MetaFox\User\Models\User::ENTITY_TYPE
Methods
__call()
public
__call(string $ability, array<string|int, mixed> $arguments) : bool
Parameters
- $ability : string
- $arguments : array<string|int, mixed>
Return values
boolapprove()
public
approve(User $user[, Content|null $resource = null ]) : bool
Parameters
Return values
boolbanUser()
public
banUser(User $user, User $owner) : bool
Parameters
Return values
boolblockUser()
public
blockUser(User $user[, User|null $owner = null ]) : bool
Parameters
Return values
boolcreate()
public
create(User $user[, User|null $owner = null ]) : bool
Parameters
Tags
Return values
booldelete()
public
delete(User $user[, Entity|null $resource = null ]) : bool
Parameters
Return values
booldeleteOwn()
public
deleteOwn(User $user[, Entity|null $resource = null ]) : bool
Parameters
Return values
booleditCover()
public
editCover(User $context, User $user) : mixed
Parameters
feature()
public
feature(User $context[, Content|null $resource = null ]) : bool
Parameters
Return values
boolgetEntityType()
public
getEntityType() : string
Return values
stringmanage()
public
manage(User $context[, Content|null $resource = null ]) : bool
Parameters
Return values
boolunBlockUser()
public
unBlockUser(User $user[, User|null $owner = null ]) : bool
Parameters
Return values
boolupdate()
public
update(User $user[, Entity|null $resource = null ]) : bool
Parameters
Return values
boolupdateSetting()
public
updateSetting(User $user[, Entity|null $resource = null ]) : bool
Parameters
Return values
booluploadAvatar()
public
uploadAvatar(User $user[, User|null $owner = null ]) : bool
Parameters
Return values
booluploadCover()
public
uploadCover(User $context, User $user) : mixed
Parameters
view()
public
view(User $user, Entity $resource) : bool
Parameters
Return values
boolviewAdminCP()
public
viewAdminCP(User $user) : bool
Parameters
- $user : User
Return values
boolviewAny()
public
viewAny(User $user[, User|null $owner = null ]) : bool
Parameters
Return values
boolviewLocation()
public
viewLocation(User $user, User $owner) : bool
Parameters
Return values
boolviewOnProfilePage()
public
viewOnProfilePage(User $user, User $owner) : bool
Parameters
Return values
boolviewOwner()
public
viewOwner(User $user[, User|null $owner = null ]) : bool