Skip to content

Commit

Permalink
Merge pull request #147 from LubosRemplik/update-docs
Browse files Browse the repository at this point in the history
Documentation for bulk actions, issue #144
  • Loading branch information
josegonzalez authored Oct 11, 2016
2 parents 922780c + 5bc73a5 commit 7fb5cc5
Showing 1 changed file with 23 additions and 0 deletions.
23 changes: 23 additions & 0 deletions docs/basic-usage.rst
Original file line number Diff line number Diff line change
Expand Up @@ -491,6 +491,29 @@ alter the ``contain()`` list for the pagination query:
return $this->Crud->execute();
}
Bulk Actions
------------

The Crud plugin provides bulk actions which can be easily used with crud view.

To set up crud action in controller do something like this in initialize method.

.. code-block:: php
$this->loadComponent('Crud.Crud', [
'actions' => [
'deleteAll' => [
'className' => 'Crud.Bulk/Delete',
],
]
]);
Then you need to configure scaffold to display select with actions.

.. code-block:: php
$action->config('scaffold.bulk_actions', [
Router::url(['action' => 'deleteAll']) => __('Delete records'),
]);
Going Forward
-------------

Expand Down

0 comments on commit 7fb5cc5

Please sign in to comment.