PHP Trait Hootlex\Moderation\Moderatable

Inheritance: use trait ModerationQueryBuilder
Mostra file Open project: hootlex/laravel-moderation

Public Methods

Method 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 method

Change resource status to Approved
public static approve ( $id ) : mixed
$id
return mixed

bootModeratable() public static method

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

getDates() public method

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

getModeratedAtColumn() public method

Get the name of the "moderated at" column.
public getModeratedAtColumn ( ) : string
return string

getModeratedByColumn() public method

Get the name of the "moderated by" column.
public getModeratedByColumn ( ) : string
return string

getQualifiedModeratedAtColumn() public method

Get the fully qualified "moderated at" column.

getQualifiedModeratedByColumn() public method

Get the fully qualified "moderated by" column.

getQualifiedStatusColumn() public method

Get the fully qualified "status" column.
public getQualifiedStatusColumn ( ) : string
return string

getStatusColumn() public method

Get the name of the "status" column.
public getStatusColumn ( ) : string
return string

isApproved() public method

Determine if the model instance has been approved.
public isApproved ( ) : boolean
return boolean

isPending() public method

Determine if the model instance has been approved.
public isPending ( ) : boolean
return boolean

isPostponed() public method

Determine if the model instance has been postponed.
public isPostponed ( ) : boolean
return boolean

isRejected() public method

Determine if the model instance has been approved.
public isRejected ( ) : boolean
return boolean

markApproved() public method

Change Instance's status to Approved
public markApproved ( ) : mixed
return mixed

markPending() public method

Change Instance's status to Pending
public markPending ( ) : mixed
return mixed

markPostponed() public method

Change Instance's status to Postponed
public markPostponed ( ) : mixed
return mixed

markRejected() public method

Change Instance's status to Rejected
public markRejected ( ) : mixed
return mixed

postpone() public static method

Change resource status to Postpone
public static postpone ( null $id ) : mixed
$id null
return mixed

reject() public static method

Change resource status to Rejected
public static reject ( null $id ) : mixed
$id null
return mixed