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 CategoriesBehavior

Categories and Tags behavior

Cake\ORM\Behavior
Extended by BEdita\Core\Model\Behavior\CategoriesBehavior
Namespace: BEdita\Core\Model\Behavior
Since: 4.1.0
Located at Core/src/Model/Behavior/CategoriesBehavior.php

Methods summary

public
# beforeSave( Cake\Event\Event $event, Cake\Datasource\EntityInterface $entity )

Set categories or tags id in save data or

Set categories or tags id in save data or

Parameters

$event
Fired event.
$entity
Entity.
protected
# prepareData( BEdita\Core\Model\Behavior\string $item, Cake\Datasource\EntityInterface $entity )

Prepare 'categories' or 'tags' data

Prepare 'categories' or 'tags' data

Parameters

$item
Item type, 'tags' or 'categories'
$entity
Entity data
protected array
# retrieveIds( BEdita\Core\Model\Behavior\string $item, Cake\Datasource\EntityInterface $entity, Cake\Datasource\EntityInterface $objectType )

Retrieve categories or tags ids from entity data

Retrieve categories or tags ids from entity data

Parameters

$item
Item type, 'tags' or 'categories'
$entity
Entity data
$objectType
Object type entity

Returns

array
protected
# updateData( BEdita\Core\Model\Behavior\string $item, Cake\Datasource\EntityInterface $entity, array $ids )

Update entity data from using $ids array. Data are removed if no category or tag has been found.

Update entity data from using $ids array. Data are removed if no category or tag has been found.

Parameters

$item
Item type, 'tags' or 'categories'
$entity
Entity data
$ids
Item array with 'name' and 'id'
BEdita API doc | 4-cactus API documentation generated by ApiGen