cakephp-tools

A CakePHP Tools plugin containing lots of useful helpers, behaviors, components, shells, ...

MIT License

Downloads
688.9K
Stars
337
Committers
22
cakephp-tools - 3.7.0 Latest Release

Published by dereuromark about 2 months ago

Fixes

  • Fixed upcoming method conflict with log(), so renamed into logException()
cakephp-tools - 2.6.2

Published by dereuromark 2 months ago

Fixes

  • Fixed missing shims for title attribute
cakephp-tools - 3.6.4

Published by dereuromark 4 months ago

Fixes

  • Fixed Table::relatedInUse()

Included commits: https://github.com/dereuromark/cakephp-tools/compare/3.6.3...3.6.4

cakephp-tools - 3.6.3

Published by dereuromark 7 months ago

Fixes

  • Fixed up DateTime difference()
cakephp-tools - 3.6.2

Published by dereuromark 8 months ago

Fixes

  • Fixed Sluggable behavior to not modify slug if the entity is not fully hydrated for the label fields.
cakephp-tools - 3.6.1

Published by dereuromark 8 months ago

Improvements

  • Allow local skip of trim in CommonComponent (per controller/action)

Fixes

  • Fixed ErrorHandlerTrait log404 config
cakephp-tools - 3.6.0

Published by dereuromark 9 months ago

Improvements

  • Added autoLink() / autoLinkUrls() improvements.

Fixes

  • Fixed Sluggable behavior to work with joined queries.
cakephp-tools - 3.5.0

Published by dereuromark 9 months ago

Improvements

  • Fixed up DateTime output for $this->Time->niceDate()
  • 404 detection (logging) also for badly behaving crawlers or search engines
cakephp-tools - 3.4.0

Published by dereuromark 9 months ago

Improvements

  • Added Encryption behavior
cakephp-tools - 3.3.0

Published by dereuromark 10 months ago

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

cakephp-tools - 3.2.0

Published by dereuromark 10 months ago

Improvements

Added EnumOptionsTrait as addon to your enums to have options() method available in your templates etc.
It allows also narrowing and re-ordering of your enum options based on the use case.

use App\Model\Enum\UserStatus;

$options = UserStatus::options();
// or for narrowing/re-ordering
$options = UserStatus::options([UserStatus::ACTIVE, UserStatus::INACTIVE]);

echo $this->Form->control('status', ['options' => $options]);
cakephp-tools - 3.1.2

Published by dereuromark 10 months ago

Fixes

Fixed icon usage in templates.

cakephp-tools - 3.1.1

Published by dereuromark 11 months ago

Fixes

Fixed icon in template and helper for new Templating plugin support.

cakephp-tools - 3.1.0

Published by dereuromark 11 months ago

Fixes

Fixed custom finders to leverage new named params.

Note: This has a BC breaking nature, but was necessary to fix up quickly after the 3.0 release.

cakephp-tools - 3.0.0

Published by dereuromark 12 months ago

CakePHP 5 compatible release

Main changes:

  • Number and DateTime classes are now in I18n namespace instead of Utility, following core namespacing.

Enjoy!

cakephp-tools - 2.6.1

Published by dereuromark about 1 year ago

Fixes

Removed deprecation that was invalid anyways.

cakephp-tools - 2.6.0

Published by dereuromark about 1 year ago

Improvements

Removed deprecations

cakephp-tools - 3.0.0-RC

Published by dereuromark about 1 year ago

CakePHP 5 compatible pre-release

Please test, once confirmed we can release stable.

cakephp-tools - 2.5.4

Published by dereuromark over 1 year ago

Fixes

  • Add existence check for URL HTTPS detection in detectHttps config
  • Fix up validateUnique rule for empty values by normalizing to DB default (null)
cakephp-tools - 2.5.3

Published by dereuromark over 1 year ago

Improvements

Added an option to check the existence of Icon::render() icon names instead of silently displaying empty (no) icon.

Package Rankings
Top 0.99% on Packagist.org
Badges
Extracted from project README
CI Coverage Status Minimum PHP Version Coding Standards