BEdita API doc | 4-cactus
  • Namespace
  • Class
  • Tree
  • Deprecated
  • Download

Namespaces

  • BEdita
    • API
      • Auth
      • Controller
        • Admin
        • Component
        • Model
      • Error
      • Event
      • Exception
      • Middleware
      • Model
        • Action
      • Network
        • Exception
      • Shell
      • TestSuite
      • Utility
    • Core
      • Configure
        • Engine
      • Database
        • Type
      • Exception
      • Filesystem
        • Adapter
        • Exception
        • Thumbnail
      • I18n
      • Job
        • Service
      • Mailer
        • Preview
        • Transport
      • Model
        • Action
        • Behavior
        • Entity
        • Table
        • Validation
      • ORM
        • Inheritance
        • Locator
        • Rule
      • Shell
        • Task
      • State
      • TestSuite
        • Fixture
      • Utility

Classes

  • CategoriesBehavior
  • DataCleanupBehavior
  • GeometryBehavior
  • ObjectModelBehavior
  • ObjectTypeBehavior
  • RelationsBehavior
  • SearchableBehavior
  • UniqueNameBehavior
  • UploadableBehavior
  • UserModifiedBehavior

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
Extended by BEdita\Core\Model\Behavior\DataCleanupBehavior
Namespace: BEdita\Core\Model\Behavior
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

Substitute NULL input data with defaults when a new Entity is being created to avoid errors

Parameters

$event
The event dispatched
$data
The input data to save

Properties summary

protected array $_defaultConfig

Default configuration.

Default configuration.

# [ 'fields' => [ 'status' => 'draft', 'deleted' => 0, ] ]
BEdita API doc | 4-cactus API documentation generated by ApiGen