Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Enabling Changelogs for a Model

As with other Behaviors, the appropriate Model should define $actsAs = ("Changelog" => array('priority' => 5)) or similar.

...

Note
titleBehavior Priority

ChangelogBehavior must execute before ContainableBehavior in order to properly filter results from contain'd finds. The default priority for behaviors is 10, so setting the priority to 5 will cause the ChangelogBehavior to execute first.

NormalizationBehavior should execute before ChangelogBehavior in order to clean up data before any save happens.

 

As with other Behaviors, the appropriate Model should define $actsAs = ("Changelog" => array('priority' => 5)) or similar.

In order to support Changelogs, a Changelog-enabled Model must define several fields. As described below, these fields are used to track changed records:

...