ViewScope
extends BaseScope
in package
Class ViewScope.
Table of Contents
Constants
- VIEW_DEFAULT = \MetaFox\Platform\Support\Browse\Browse::VIEW_ALL
- VIEW_NO_ALBUM = 'no_album'
- VIEW_TAG_WALL = 'tag_wall'
Properties
- $isViewOwner : bool
- $owner : User
- $profileId : int
- $user : User
- $view : string
Methods
- apply() : mixed
- applyQueryBuilder() : void
- getAllowView() : array<int, string>
- getProfileId() : int
- getUserContext() : User
- getView() : string
- isViewOwner() : bool
- likeOperator() : string
- return the case-insensitive LIKE operator bases on the current database driver.
- setIsViewOwner() : ViewScope
- setProfileId() : ViewScope
- setUserContext() : ViewScope
- setView() : ViewScope
- alias() : string
- buildQueryViewNoAlbum() : void
- handleJoinForMyTag() : void
- handleQueryForMyTag() : void
Constants
VIEW_DEFAULT
public
mixed
VIEW_DEFAULT
= \MetaFox\Platform\Support\Browse\Browse::VIEW_ALL
VIEW_NO_ALBUM
public
mixed
VIEW_NO_ALBUM
= 'no_album'
VIEW_TAG_WALL
public
mixed
VIEW_TAG_WALL
= 'tag_wall'
Properties
$isViewOwner
protected
bool
$isViewOwner
= false
$owner
protected
User
$owner
$profileId
protected
int
$profileId
= 0
$user
protected
User
$user
$view
protected
string
$view
= self::VIEW_DEFAULT
Methods
apply()
public
apply(Builder $builder, Model $model) : mixed
Parameters
- $builder : Builder
- $model : Model
applyQueryBuilder()
public
applyQueryBuilder(Builder $builder) : void
Parameters
- $builder : Builder
getAllowView()
public
static getAllowView() : array<int, string>
Return values
array<int, string>getProfileId()
public
getProfileId() : int
Return values
intgetUserContext()
public
getUserContext() : User
Return values
UsergetView()
public
getView() : string
Return values
stringisViewOwner()
public
isViewOwner() : bool
Return values
boollikeOperator()
return the case-insensitive LIKE operator bases on the current database driver.
public
likeOperator() : string
Return values
stringsetIsViewOwner()
public
setIsViewOwner(bool $isViewOwner) : ViewScope
Parameters
- $isViewOwner : bool
Return values
ViewScopesetProfileId()
public
setProfileId(int $profileId) : ViewScope
Parameters
- $profileId : int
Return values
ViewScopesetUserContext()
public
setUserContext(User $user) : ViewScope
Parameters
- $user : User
Return values
ViewScopesetView()
public
setView(string $view) : ViewScope
Parameters
- $view : string
Return values
ViewScopealias()
protected
alias(string $table, string $column) : string
Parameters
- $table : string
- $column : string
Return values
stringbuildQueryViewNoAlbum()
protected
buildQueryViewNoAlbum(Builder $builder, string $table, User $userContext) : void
Parameters
- $builder : Builder
- $table : string
- $userContext : User
handleJoinForMyTag()
protected
handleJoinForMyTag(Builder $builder, string $table) : void
Parameters
- $builder : Builder
- $table : string
handleQueryForMyTag()
protected
handleQueryForMyTag(Builder $builder, string $table) : void
Parameters
- $builder : Builder
- $table : string