Behaviors
Ten ORM behaviors covering the patterns that appear across most CakePHP applications.
| Behavior | Purpose |
|---|---|
| AfterSave | Hook for queueing follow-up work after an entity save. |
| Bitmasked | Store a set of flags / enum values as a single bitmask integer column. |
| Encryption | Transparent column-level encryption / decryption on save & find. |
| Jsonable | Automatic JSON encode/decode for fields stored as JSON. |
| Passwordable | Password change flow with confirm + current-password validation. |
| Reset | Reset / recompute denormalized fields across rows. |
| Slugged | Auto-generate URL slugs from a source field. |
| String | String-related field manipulation (whitespace, casing, etc.). |
| Toggle | Boolean-flag toggling with constraints (e.g. only one active). |
| Typographic | Typographic cleanup of text fields (smart quotes, dashes, etc.). |
To use any behavior in a Table:
php
public function initialize(array $config): void {
parent::initialize($config);
$this->addBehavior('Tools.Bitmasked');
}