PrivacyPolicy
in
Table of Contents
Methods
- checkBlockUser() : bool
- checkCreateOnOwner() : bool
- Check an User can post on another user.
- checkCreateResourceOnOwner() : bool
- Check an User can post an specific resource on another user.
- checkItemPrivacy() : bool
- checkPermission() : bool
- Check permission on resource.
- checkPermissionOwner() : bool
- Check permission on owner.
- getPrivacyItem() : array<string, mixed>
- Get privacy item by privacy ids.
- getResourcePrivacyList() : array<string|int, int>
- Get privacy list of a resource.
- hasAbilityOnOwner() : bool
- Check user has ability on owner.
Methods
checkBlockUser()
public
checkBlockUser(User $user, User $owner) : bool
Parameters
Return values
boolcheckCreateOnOwner()
Check an User can post on another user.
public
checkCreateOnOwner(User $user, User $owner) : bool
Parameters
Return values
boolcheckCreateResourceOnOwner()
Check an User can post an specific resource on another user.
public
checkCreateResourceOnOwner(Content $content) : bool
Parameters
- $content : Content
Return values
boolcheckItemPrivacy()
public
checkItemPrivacy(User $user, User $owner, HasPrivacy $content[, array<string|int, mixed>|null $privacyIds = null ]) : bool
Parameters
- $user : User
- $owner : User
- $content : HasPrivacy
- $privacyIds : array<string|int, mixed>|null = null
Return values
boolcheckPermission()
Check permission on resource.
public
checkPermission(User|null $user, Entity $content) : bool
Parameters
Return values
boolcheckPermissionOwner()
Check permission on owner.
public
checkPermissionOwner(User $user, User|null $owner[, bool $cache = true ]) : bool
Example group has privacy.
Parameters
Tags
Return values
boolgetPrivacyItem()
Get privacy item by privacy ids.
public
getPrivacyItem(Content $content) : array<string, mixed>
Parameters
- $content : Content
Return values
array<string, mixed>getResourcePrivacyList()
Get privacy list of a resource.
public
getResourcePrivacyList(Content $content) : array<string|int, int>
If model implement HasResourceStream it will use its own stream. Otherwise it will use global stream.
Parameters
- $content : Content
Tags
Return values
array<string|int, int>hasAbilityOnOwner()
Check user has ability on owner.
public
hasAbilityOnOwner(User $user, User $owner, int $privacy[, string|null $privacyType = null ]) : bool