PHP Trait Hootlex\Moderation\Moderatable

Inheritance: use trait ModerationQueryBuilder
Afficher le fichier Open project: hootlex/laravel-moderation

Méthodes publiques

Méthode Description
approve ( $id ) : mixed Change resource status to Approved
bootModeratable ( ) : void Boot the soft deleting trait for a model.
getDates ( ) : string Get the name of the "moderated at" column.
getModeratedAtColumn ( ) : string Get the name of the "moderated at" column.
getModeratedByColumn ( ) : string Get the name of the "moderated by" column.
getQualifiedModeratedAtColumn ( ) : string Get the fully qualified "moderated at" column.
getQualifiedModeratedByColumn ( ) : string Get the fully qualified "moderated by" column.
getQualifiedStatusColumn ( ) : string Get the fully qualified "status" column.
getStatusColumn ( ) : string Get the name of the "status" column.
isApproved ( ) : boolean Determine if the model instance has been approved.
isPending ( ) : boolean Determine if the model instance has been approved.
isPostponed ( ) : boolean Determine if the model instance has been postponed.
isRejected ( ) : boolean Determine if the model instance has been approved.
markApproved ( ) : mixed Change Instance's status to Approved
markPending ( ) : mixed Change Instance's status to Pending
markPostponed ( ) : mixed Change Instance's status to Postponed
markRejected ( ) : mixed Change Instance's status to Rejected
postpone ( null $id ) : mixed Change resource status to Postpone
reject ( null $id ) : mixed Change resource status to Rejected

Method Details

approve() public static méthode

Change resource status to Approved
public static approve ( $id ) : mixed
$id
Résultat mixed

bootModeratable() public static méthode

Boot the soft deleting trait for a model.
public static bootModeratable ( ) : void
Résultat void

getDates() public méthode

Append "moderated at" column to the attributes that should be converted to dates.
public getDates ( ) : string
Résultat string

getModeratedAtColumn() public méthode

Get the name of the "moderated at" column.
public getModeratedAtColumn ( ) : string
Résultat string

getModeratedByColumn() public méthode

Get the name of the "moderated by" column.
public getModeratedByColumn ( ) : string
Résultat string

getQualifiedModeratedAtColumn() public méthode

Get the fully qualified "moderated at" column.

getQualifiedModeratedByColumn() public méthode

Get the fully qualified "moderated by" column.

getQualifiedStatusColumn() public méthode

Get the fully qualified "status" column.
public getQualifiedStatusColumn ( ) : string
Résultat string

getStatusColumn() public méthode

Get the name of the "status" column.
public getStatusColumn ( ) : string
Résultat string

isApproved() public méthode

Determine if the model instance has been approved.
public isApproved ( ) : boolean
Résultat boolean

isPending() public méthode

Determine if the model instance has been approved.
public isPending ( ) : boolean
Résultat boolean

isPostponed() public méthode

Determine if the model instance has been postponed.
public isPostponed ( ) : boolean
Résultat boolean

isRejected() public méthode

Determine if the model instance has been approved.
public isRejected ( ) : boolean
Résultat boolean

markApproved() public méthode

Change Instance's status to Approved
public markApproved ( ) : mixed
Résultat mixed

markPending() public méthode

Change Instance's status to Pending
public markPending ( ) : mixed
Résultat mixed

markPostponed() public méthode

Change Instance's status to Postponed
public markPostponed ( ) : mixed
Résultat mixed

markRejected() public méthode

Change Instance's status to Rejected
public markRejected ( ) : mixed
Résultat mixed

postpone() public static méthode

Change resource status to Postpone
public static postpone ( null $id ) : mixed
$id null
Résultat mixed

reject() public static méthode

Change resource status to Rejected
public static reject ( null $id ) : mixed
$id null
Résultat mixed