Releases: dereuromark/cakephp-tools
Releases · dereuromark/cakephp-tools
3.7.0
2.6.2
Fixes
- Fixed missing shims for title attribute
3.6.4
3.6.3
Fixes
- Fixed up DateTime difference()
3.6.2
Fixes
- Fixed Sluggable behavior to not modify slug if the entity is not fully hydrated for the label fields.
3.6.1
Improvements
- Allow local skip of trim in CommonComponent (per controller/action)
Fixes
- Fixed ErrorHandlerTrait log404 config
3.6.0
Improvements
- Added autoLink() / autoLinkUrls() improvements.
Fixes
- Fixed Sluggable behavior to work with joined queries.
3.5.0
Improvements
- Fixed up
DateTime
output for$this->Time->niceDate()
- 404 detection (logging) also for badly behaving crawlers or search engines
3.4.0
Improvements
- Added Encryption behavior
3.3.0
Improvements
Added Enum support for Bitmasked behavior
use App\Model\Enum\CommentStatus;
$this->Comments->addBehavior('Tools.Bitmasked', [
'bits' => CommentStatus::class,
'mappedField' => 'statuses'],
);
By using an Enum for bits it will automatically switch the incoming and outcoming bit values to Enum instances.
You can also manually set the bits using an array, but then you would have to also set enum
to the Enum class:
$this->Comments->addBehavior('Tools.Bitmasked', [
'bits' => CommentStatus::tryFrom(CommentStatus::None->value)::options(),
'enum' => CommentStatus::class,
'mappedField' => 'statuses'],
);
Live demo: https://sandbox.dereuromark.de/sandbox/tools-examples/bitmask-enums