MetaFox

PrivacyRepository extends AbstractRepository
in package
implements PrivacyRepositoryInterface

Class PrivacyListRepository.

Tags
SuppressWarnings

(PHPMD.CyclomaticComplexity)

Table of Contents

Interfaces

PrivacyRepositoryInterface
Interface PrivacyListRepositoryInterface.

Properties

$model  : Privacy
$disableSponsor  : mixed
$skipPresenter  : mixed

Methods

buildQueryScopes()  : mixed
cleanContent()  : string|null
cleanTitle()  : string|null
create()  : Privacy
createMany()  : bool
forceCreatePrivacyStream()  : void
getCustomPrivacyOptions()  : Arrayable
getModel()  : Privacy
getPrivacyId()  : int
getPrivacyIdForUserPrivacy()  : int
Get privacy id for user privacy (user_privacy_values table).
getPrivacyIdsForContent()  : array<string|int, int>
Get privacy list for content resource.
getPrivacyIdsForMembership()  : array<string|int, int>
Get privacy list for membership resource.
getPrivacyTypeByPrivacy()  : string|null
getUserContractMorphTypeColumns()  : array<string|int, string>
hasSponsorView()  : bool
isNoSponsorView()  : bool
likeOperator()  : string
return the case-insensitive LIKE operator bases on the current database driver.
model()  : mixed
where()  : $this
withUserMorphTypeActiveScope()  : self
getItemCustomPrivacies()  : array<string|int, mixed>|null
getPrivaciesByOwnerId()  : Collection
getPrivacyIdByPrivacy()  : int
getPrivacyIdsByPrivacy()  : array<string|int, mixed>

Properties

Methods

buildQueryScopes()

public buildQueryScopes(mixed $query, mixed $model, mixed $criteria) : mixed
Parameters
$query : mixed
$model : mixed
$criteria : mixed

cleanContent()

public cleanContent(string|null $string) : string|null
Parameters
$string : string|null
Return values
string|null

cleanTitle()

public cleanTitle(string|null $string) : string|null
Parameters
$string : string|null
Return values
string|null

createMany()

public createMany(array<string|int, mixed> $items) : bool
Parameters
$items : array<string|int, mixed>
Return values
bool

getCustomPrivacyOptions()

public getCustomPrivacyOptions(User $context[, array<string|int, mixed> $params = [] ]) : Arrayable
Parameters
$context : User
$params : array<string|int, mixed> = []
Return values
Arrayable

getPrivacyId()

public getPrivacyId(int $itemId, string $itemType, string $privacyType) : int
Parameters
$itemId : int
$itemType : string
$privacyType : string
Return values
int

getPrivacyIdForUserPrivacy()

Get privacy id for user privacy (user_privacy_values table).

public getPrivacyIdForUserPrivacy(int $ownerId, int $privacy) : int
Parameters
$ownerId : int
$privacy : int
Return values
int

getPrivacyIdsForContent()

Get privacy list for content resource.

public getPrivacyIdsForContent(Entity $content) : array<string|int, int>
Parameters
$content : Entity
Return values
array<string|int, int>

getPrivacyIdsForMembership()

Get privacy list for membership resource.

public getPrivacyIdsForMembership(Membership $membership) : array<string|int, int>
Parameters
$membership : Membership
Return values
array<string|int, int>

getPrivacyTypeByPrivacy()

public getPrivacyTypeByPrivacy(int $ownerId, int $privacy) : string|null
Parameters
$ownerId : int
$privacy : int
Return values
string|null

getUserContractMorphTypeColumns()

public getUserContractMorphTypeColumns() : array<string|int, string>
Return values
array<string|int, string>

hasSponsorView()

public hasSponsorView(array<string|int, mixed> $attributes) : bool
Parameters
$attributes : array<string|int, mixed>
Return values
bool

isNoSponsorView()

public isNoSponsorView(string|null $view) : bool
Parameters
$view : string|null
Return values
bool

likeOperator()

return the case-insensitive LIKE operator bases on the current database driver.

public likeOperator() : string
Return values
string

where()

public where(array<string|int, mixed> $params) : $this
Parameters
$params : array<string|int, mixed>
Tags
throws
RepositoryException
Return values
$this

withUserMorphTypeActiveScope()

public withUserMorphTypeActiveScope() : self
Return values
self

getItemCustomPrivacies()

protected getItemCustomPrivacies(string $itemType, int $itemId) : array<string|int, mixed>|null
Parameters
$itemType : string
$itemId : int
Return values
array<string|int, mixed>|null

getPrivaciesByOwnerId()

protected getPrivaciesByOwnerId(int $ownerId) : Collection
Parameters
$ownerId : int
Return values
Collection

getPrivacyIdByPrivacy()

protected getPrivacyIdByPrivacy(int $ownerId, int $privacy) : int
Parameters
$ownerId : int
$privacy : int
Return values
int

getPrivacyIdsByPrivacy()

protected getPrivacyIdsByPrivacy(int $ownerId, int $privacy) : array<string|int, mixed>
Parameters
$ownerId : int
$privacy : int
Return values
array<string|int, mixed>

        
On this page

Search results