PHP Class luya\behaviors\Timestamp

Since: 1.0.0-beta5
Author: nadar
Inheritance: extends yii\base\Behavior
Show file Open project: luyadev/luya

Public Properties

Property Type Description
$insert An array with all fields where the timestamp should be applied to on insert.
$update An array with all fields where the timestamp should be applied to on update.

Public Methods

Method Description
beforeInsert ( Event $event ) Insert the timestamp for all provided fields.
beforeUpdate ( Event $event ) Update the timestamp for all provided fields.
events ( ) Register event handlers before insert and update.

Method Details

beforeInsert() public method

Insert the timestamp for all provided fields.
public beforeInsert ( Event $event )
$event yii\base\Event Event object from Active Record.

beforeUpdate() public method

Update the timestamp for all provided fields.
public beforeUpdate ( Event $event )
$event yii\base\Event Event object from Active Record.

events() public method

Register event handlers before insert and update.
See also: yii\base\Behavior::events()
public events ( )

Property Details

$insert public property

An array with all fields where the timestamp should be applied to on insert.
public $insert

$update public property

An array with all fields where the timestamp should be applied to on update.
public $update