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
$disableSponsor
protected
mixed
$disableSponsor
$skipPresenter
protected
mixed
$skipPresenter
= true
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|nullcleanTitle()
public
cleanTitle(string|null $string) : string|null
Parameters
- $string : string|null
Return values
string|nullclearCache()
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
boolfindPin()
public
findPin(User $context, User|null $owner, int $feedId) : Pin|null
Parameters
Return values
Pin|nullgetPinOwnerIds()
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
boolisNoSponsorView()
public
isNoSponsorView(string|null $view) : bool
Parameters
- $view : string|null
Return values
boollikeOperator()
return the case-insensitive LIKE operator bases on the current database driver.
public
likeOperator() : string
Return values
stringmodel()
public
model() : mixed
pin()
public
pin(User $context, User $owner, int $feedId) : bool
Parameters
Return values
boolpinHome()
public
pinHome(User $context, int $feedId) : bool
Parameters
- $context : User
- $feedId : int
Return values
boolunpin()
public
unpin(User $context, User $owner, int $feedId) : bool
Parameters
Return values
boolunpinHome()
public
unpinHome(User $context, int $feedId) : bool
Parameters
- $context : User
- $feedId : int
Return values
boolwhere()
public
where(array<string|int, mixed> $params) : $this
Parameters
- $params : array<string|int, mixed>
Tags
Return values
$thiswithUserMorphTypeActiveScope()
public
withUserMorphTypeActiveScope() : self
Return values
selfgetBuilder()
protected
getBuilder([int|null $ownerId = null ]) : Builder
Parameters
- $ownerId : int|null = null