PHP Class Hootlex\Moderation\ModerationScope

Inheritance: implements Illuminate\Database\Eloquent\Scope
Afficher le fichier Open project: hootlex/laravel-moderation

Protected Properties

Свойство Type Description
$extensions array All of the extensions to be added to the builder.

Méthodes publiques

Méthode Description
apply ( Builder $builder, Model $model ) : void Apply the scope to a given Eloquent query builder.
extend ( Builder $builder ) : void Extend the query builder with the needed functions.
remove ( Builder $builder, Model $model ) : void Remove the scope from the given Eloquent query builder.

Méthodes protégées

Méthode Description
addApprove ( Builder $builder ) : void Add the Approve extension to the builder.
addPend ( Builder $builder ) : void Add the Postpone extension to the builder.
addPending ( Builder $builder ) : void Add the Pending extension to the builder.
addPostpone ( Builder $builder ) : void Add the Postpone extension to the builder.
addPostponed ( Builder $builder ) : void Add the Postponed extension to the builder.
addReject ( Builder $builder ) : void Add the Reject extension to the builder.
addRejected ( Builder $builder ) : void Add the Rejected extension to the builder.
addWithAnyStatus ( Builder $builder ) : void Add the with-any-status extension to the builder.
addWithPending ( Builder $builder ) : void Add the with-pending extension to the builder.
addWithPostponed ( Builder $builder ) : void Add the with-postpone extension to the builder.
addWithRejected ( Builder $builder ) : void Add the with-rejected extension to the builder.
getStatusColumn ( Builder $builder ) : string Get the "deleted at" column for the builder.
isModerationConstraint ( array $where, string $column ) : boolean Determine if the given where clause is a moderation constraint.
removeBinding ( $query, integer $key ) Remove scope constraint from the query.
removeWhere ( $query, integer $key ) Remove scope constraint from the query.

Private Methods

Méthode Description
updateModerationStatus ( Builder $builder, $id, $status ) : boolean | integer

Method Details

addApprove() protected méthode

Add the Approve extension to the builder.
protected addApprove ( Builder $builder ) : void
$builder Illuminate\Database\Eloquent\Builder
Résultat void

addPend() protected méthode

Add the Postpone extension to the builder.
protected addPend ( Builder $builder ) : void
$builder Illuminate\Database\Eloquent\Builder
Résultat void

addPending() protected méthode

Add the Pending extension to the builder.
protected addPending ( Builder $builder ) : void
$builder Illuminate\Database\Eloquent\Builder
Résultat void

addPostpone() protected méthode

Add the Postpone extension to the builder.
protected addPostpone ( Builder $builder ) : void
$builder Illuminate\Database\Eloquent\Builder
Résultat void

addPostponed() protected méthode

Add the Postponed extension to the builder.
protected addPostponed ( Builder $builder ) : void
$builder Illuminate\Database\Eloquent\Builder
Résultat void

addReject() protected méthode

Add the Reject extension to the builder.
protected addReject ( Builder $builder ) : void
$builder Illuminate\Database\Eloquent\Builder
Résultat void

addRejected() protected méthode

Add the Rejected extension to the builder.
protected addRejected ( Builder $builder ) : void
$builder Illuminate\Database\Eloquent\Builder
Résultat void

addWithAnyStatus() protected méthode

Add the with-any-status extension to the builder.
protected addWithAnyStatus ( Builder $builder ) : void
$builder Illuminate\Database\Eloquent\Builder
Résultat void

addWithPending() protected méthode

Add the with-pending extension to the builder.
protected addWithPending ( Builder $builder ) : void
$builder Illuminate\Database\Eloquent\Builder
Résultat void

addWithPostponed() protected méthode

Add the with-postpone extension to the builder.
protected addWithPostponed ( Builder $builder ) : void
$builder Illuminate\Database\Eloquent\Builder
Résultat void

addWithRejected() protected méthode

Add the with-rejected extension to the builder.
protected addWithRejected ( Builder $builder ) : void
$builder Illuminate\Database\Eloquent\Builder
Résultat void

apply() public méthode

Apply the scope to a given Eloquent query builder.
public apply ( Builder $builder, Model $model ) : void
$builder Illuminate\Database\Eloquent\Builder
$model Illuminate\Database\Eloquent\Model
Résultat void

extend() public méthode

Extend the query builder with the needed functions.
public extend ( Builder $builder ) : void
$builder Illuminate\Database\Eloquent\Builder
Résultat void

getStatusColumn() protected méthode

Get the "deleted at" column for the builder.
protected getStatusColumn ( Builder $builder ) : string
$builder Illuminate\Database\Eloquent\Builder
Résultat string

isModerationConstraint() protected méthode

Determine if the given where clause is a moderation constraint.
protected isModerationConstraint ( array $where, string $column ) : boolean
$where array
$column string
Résultat boolean

remove() public méthode

(This method exists in order to achieve compatibility with laravel 5.1.*)
public remove ( Builder $builder, Model $model ) : void
$builder Illuminate\Database\Eloquent\Builder
$model Illuminate\Database\Eloquent\Model
Résultat void

removeBinding() protected méthode

Remove scope constraint from the query.
protected removeBinding ( $query, integer $key )
$query
$key integer

removeWhere() protected méthode

Remove scope constraint from the query.
protected removeWhere ( $query, integer $key )
$query
$key integer

Property Details

$extensions protected_oe property

All of the extensions to be added to the builder.
protected array $extensions
Résultat array