\WorkflowCommentBehavior

WorkflowComment Behavior

Summary

Methods
Properties
Constants
beforeValidate()
afterSave()
beforeDelete()
afterDelete()
getCommentsByContentKey()
deleteCommentsByContentKey()
No public properties found
No constants found
No protected methods found
$_deletedRow
N/A
No private methods found
No private properties found
N/A

Properties

$_deletedRow

$_deletedRow : array

削除するデータ保持用配列

Type

array

Methods

beforeValidate()

beforeValidate(\Model  $model, array  $options = array()) : mixed

beforeValidate is called before a model is validated, you can use this callback to add behavior validation rules into a models validate array. Returning false will allow you to make the validation fail.

Parameters

\Model $model

Model using this behavior

array $options

Options passed from Model::save().

Returns

mixed —

False or null will abort the operation. Any other result will continue.

afterSave()

afterSave(\Model  $model, boolean  $created, array  $options = array()) : boolean

afterSave is called after a model is saved.

Parameters

\Model $model

Model using this behavior

boolean $created

True if this save created a new record

array $options

Options passed from Model::save().

Throws

\InternalErrorException

Returns

boolean

beforeDelete()

beforeDelete(\Model  $model, boolean  $cascade = true) : mixed

Before delete is called before any delete occurs on the attached model, but after the model's beforeDelete is called. Returning false from a beforeDelete will abort the delete.

Parameters

\Model $model

Model using this behavior

boolean $cascade

If true records that depend on this record will also be deleted

Throws

\InternalErrorException

Returns

mixed —

False if the operation should abort. Any other result will continue.

afterDelete()

afterDelete(\Model  $model) : void

After delete is called after any delete occurs on the attached model.

Parameters

\Model $model

Model using this behavior

Throws

\InternalErrorException

getCommentsByContentKey()

getCommentsByContentKey(\Model  $model, string  $contentKey) : array

Get WorkflowComment data

Parameters

\Model $model

Model using this behavior

string $contentKey

Content key

Returns

array

deleteCommentsByContentKey()

deleteCommentsByContentKey(\Model  $model, string  $contentKey) : boolean

Delete comments by content key

Parameters

\Model $model

Model using this behavior

string $contentKey

content key

Throws

\InternalErrorException

Returns

boolean —

True on success