k1low/darumaotoshi

"Archive and delete" (slide delete) plugin for CakePHP 3

Fund package maintenance!
k1LoW

Installs: 5

Dependents: 0

Suggesters: 0

Security: 0

Stars: 1

Watchers: 2

Forks: 0

Open Issues: 0

Type:cakephp-plugin

v1.1.0 2016-08-29 09:25 UTC

This package is auto-updated.

Last update: 2024-04-06 08:23:15 UTC


README

だるま落とし

"Archive and delete" (slide delete) plugin for CakePHP 3

Installation

$ composer require k1low/darumaotoshi

Enable plugin

$ bin/cake plugin load Darumaotoshi

Load required database table

$ bin/cake migrations migrate --plugin Darumaotoshi

Usage

// in the initialize() method
$this->addBehavior('Darumaotoshi.Darumaotoshi');

Cascading deletion

If you'd like to have related records marked as trashed when deleting a parent item, you can just attach the behavior to the related table classes, and set the 'dependent' => true, 'cascadeCallbacks' => true options in the table relationships.

Code References

UseMuffin/Trash

Copyright (c) 2015, Use Muffin and licensed under The MIT License.

License

under The MIT License.