You can use the Bulk\DeleteAction
class to delete a group of database records.
<?php
namespace App\Controller;
class PostsController extends AppController
{
public function initialize()
{
parent::initialize();
$this->Crud->mapAction('deleteAll', 'Crud.Bulk/Delete');
}
}
This is a list of events emitted from actions that extend Bulk\BaseAction
.
Please see the events documentation</events>
for a full list of generic properties and how to use the event system correctly.