MetaFox

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

checkCreateOnOwner()

Check an User can post on another user.

public checkCreateOnOwner(User $user, User $owner) : bool
Parameters
$user : User
$owner : User
Return values
bool

checkCreateResourceOnOwner()

Check an User can post an specific resource on another user.

public checkCreateResourceOnOwner(Content $content) : bool
Parameters
$content : Content
Return values
bool

checkItemPrivacy()

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
bool

checkPermission()

Check permission on resource.

public checkPermission(User|null $user, Entity $content) : bool
Parameters
$user : User|null
$content : Entity
Return values
bool

checkPermissionOwner()

Check permission on owner.

public checkPermissionOwner(User $user, User|null $owner[, bool $cache = true ]) : bool

Example group has privacy.

Parameters
$user : User
$owner : User|null
$cache : bool = true
Tags
SuppressWarnings

(PHPMD.BooleanArgumentFlag)

Return values
bool

getPrivacyItem()

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
see
HasResourceStream
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
Parameters
$user : User
$owner : User
$privacy : int
$privacyType : string|null = null
Return values
bool

        
On this page

Search results