\OriginalKeyBehavior

OriginalKey Behavior

Summary

Methods
Properties
Constants
beforeSave()
afterSave()
generateKey()
$settings
No constants found
No protected methods found
No protected properties found
N/A
No private methods found
No private properties found
N/A

Properties

$settings

$settings : array

ビヘイビアの設定

Type

array

Methods

beforeSave()

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.

Parameters

\Model $model

Model using this behavior

array $options

Options passed from Model::save().

Returns

mixed —

False if the operation should abort. 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().

Returns

boolean

generateKey()

generateKey(string  $plugin, string  $dataSource) : string

Generate key

Parameters

string $plugin

Plugin name

string $dataSource

The name of the DataSource, as defined in app/Config/database.php

Returns

string —

Hash key