PrivacyPolicyRepository
in package
implements
PrivacyPolicy
Class PrivacyPolicyRepository.
Tags
Table of Contents
Interfaces
Properties
- $permissionOnOwner : array<string, bool>
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.
- checkPublicPermissionOwner() : bool
- checkHasAbility() : bool
- checkPermissionOwnerCache() : bool|null
- handleCheckPermissionOwner() : bool
- setPermissionOwnerCache() : void
Properties
$permissionOnOwner
private
array<string, bool>
$permissionOnOwner
= []
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
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
Return values
array<string|int, int>hasAbilityOnOwner()
Check user has ability on owner.
public
hasAbilityOnOwner(User $user, User $owner, int $privacy[, string $privacyType = null ]) : bool
Parameters
Return values
boolcheckPublicPermissionOwner()
protected
checkPublicPermissionOwner(User $user, User $owner) : bool
Parameters
Return values
boolcheckHasAbility()
private
checkHasAbility(User $user, array<string|int, mixed> $privacyIds, int $privacy) : bool
Parameters
- $user : User
- $privacyIds : array<string|int, mixed>
- $privacy : int
Return values
boolcheckPermissionOwnerCache()
private
checkPermissionOwnerCache(User $user, User|null $owner) : bool|null
Parameters
Return values
bool|nullhandleCheckPermissionOwner()
private
handleCheckPermissionOwner(User $user, User $owner) : bool
Parameters
Return values
boolsetPermissionOwnerCache()
private
setPermissionOwnerCache(User $user, User $owner, bool $value) : void