Class DataCleanupBehavior
DataCleanup behavior
Data cleanup operations on object creations to allow operations with dirty
input data
and setting basic values per fields, per object type (from configuration 'DefaultValues')
This Behavoir acts only on Model.beforeMarshal event
- Cake\ORM\Behavior
-
BEdita\Core\Model\Behavior\DataCleanupBehavior
Namespace: BEdita\Core\Model\Behavior
Since: 4.0.0
Located at Core/src/Model/Behavior/DataCleanupBehavior.php
Since: 4.0.0
Located at Core/src/Model/Behavior/DataCleanupBehavior.php
Methods summary
public
|
#
beforeMarshal( Cake\Event\Event $event, ArrayObject $data )
Substitute NULL input data with defaults when a new Entity is being created to avoid errors |
Properties summary
protected
array
|
$_defaultConfig
Default configuration. |
#
[
'fields' => [
'status' => 'draft',
'deleted' => 0,
]
]
|