UserPreferenceRepository
extends AbstractRepository
in package
implements
UserPreferenceRepositoryInterface
Class UserPreferenceRepository.
Table of Contents
Interfaces
- UserPreferenceRepositoryInterface
- Interface UserPreference.
Properties
- $disableSponsor : mixed
- $skipPresenter : mixed
Methods
- buildQueryScopes() : mixed
- cleanContent() : string|null
- cleanTitle() : string|null
- createMany() : bool
- getModel() : UserPreference
- getPreferences() : array<string, mixed>
- Get all current user preferences.
- 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
- updateOrCreatePreferences() : array<string, mixed>
- Update user preferences or create a new one if not exist.
- where() : $this
- withUserMorphTypeActiveScope() : self
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|nullcreateMany()
public
createMany(array<string|int, mixed> $items) : bool
Parameters
- $items : array<string|int, mixed>
Return values
boolgetModel()
public
getModel() : UserPreference
Return values
UserPreferencegetPreferences()
Get all current user preferences.
public
getPreferences(User $user) : array<string, mixed>
Parameters
- $user : User
Tags
Return values
array<string, mixed>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
updateOrCreatePreferences()
Update user preferences or create a new one if not exist.
public
updateOrCreatePreferences(User $user[, array<string|int, mixed> $attributes = [] ]) : array<string, mixed>
Parameters
- $user : User
- $attributes : array<string|int, mixed> = []
Tags
Return values
array<string, mixed>where()
public
where(array<string|int, mixed> $params) : $this
Parameters
- $params : array<string|int, mixed>
Tags
Return values
$thiswithUserMorphTypeActiveScope()
public
withUserMorphTypeActiveScope() : self