MetaFox

PinRepository extends AbstractRepository
in package
implements PinRepositoryInterface

Class PinRepository.

Table of Contents

Interfaces

PinRepositoryInterface
Interface Pin.

Constants

HOMEPAGE_PIN_CACHE_ID  = 'activity_homepage_pins'

Properties

$disableSponsor  : mixed
$skipPresenter  : mixed

Methods

buildQueryScopes()  : mixed
cleanContent()  : string|null
cleanTitle()  : string|null
clearCache()  : void
createMany()  : bool
findPin()  : Pin|null
getPinOwnerIds()  : array<string|int, mixed>
Get pins target by current user id.
getPinsInHomePage()  : array<string|int, int>
getPinsInProfilePage()  : array<string|int, int>
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
pin()  : bool
pinHome()  : bool
unpin()  : bool
unpinHome()  : bool
where()  : $this
withUserMorphTypeActiveScope()  : self
getBuilder()  : Builder

Constants

HOMEPAGE_PIN_CACHE_ID

public mixed HOMEPAGE_PIN_CACHE_ID = 'activity_homepage_pins'

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

clearCache()

public clearCache([int|null $ownerId = null ]) : void
Parameters
$ownerId : int|null = null

createMany()

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

getPinOwnerIds()

Get pins target by current user id.

public getPinOwnerIds(User $context, int $feedId) : array<string|int, mixed>
Parameters
$context : User
$feedId : int
Return values
array<string|int, mixed>

getPinsInHomePage()

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

getPinsInProfilePage()

public getPinsInProfilePage(int $ownerId) : array<string|int, int>
Parameters
$ownerId : int
Return values
array<string|int, int>

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

pin()

public pin(User $context, User $owner, int $feedId) : bool
Parameters
$context : User
$owner : User
$feedId : int
Return values
bool

pinHome()

public pinHome(User $context, int $feedId) : bool
Parameters
$context : User
$feedId : int
Return values
bool

unpin()

public unpin(User $context, User $owner, int $feedId) : bool
Parameters
$context : User
$owner : User
$feedId : int
Return values
bool

unpinHome()

public unpinHome(User $context, int $feedId) : bool
Parameters
$context : User
$feedId : int
Return values
bool

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

getBuilder()

protected getBuilder([int|null $ownerId = null ]) : Builder
Parameters
$ownerId : int|null = null
Return values
Builder

        
On this page

Search results