PUBLIC_TYPE_PRIVATE
PUBLIC_TYPE_PRIVATE = '0' : integer
Block type
Workflow Behavior
beforeSave(\Model $model, array $options = array()) : mixed
beforeSave is called before a model is saved. Returning false from a beforeSave callback will abort the save operation.
\Model | $model | Model using this behavior |
array | $options | Options passed from Model::save(). |
False if the operation should abort. Any other result will continue.
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.
\Model | $model | Model using this behavior |
array | $options | Options passed from Model::save(). |
False or null will abort the operation. Any other result will continue.
getWorkflowContents(\Model $model, string $type, array $query = array()) : array
Get workflow contents
\Model | $model | Model using this behavior |
string | $type | Type of find operation (all / first / count / neighbors / list / threaded) |
array | $query | Option fields (conditions / fields / joins / limit / offset / order / page / group / callbacks) |
Conditions data
canDeleteWorkflowContent(\Model $model, array $data) : boolean
コンテンツの公開権限があるかどうかのチェック - 公開権限あり(content_publishable) and 編集権限あり(content_editable) - 自分自身のコンテンツ+一度も公開されていない
\Model | $model | Model using this behavior |
array | $data | コンテンツデータ |
true:削除可、false:削除不可