From e572ae3b697a57a4724a0e928d7773bd777968f4 Mon Sep 17 00:00:00 2001 From: will Date: Tue, 9 Jan 2024 10:39:08 +0000 Subject: [PATCH] Update BULK_MANAGER.md Add notes on adding and removing actions as it wasn't obvious for me on first look. --- docs/en/BULK_MANAGER.md | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/docs/en/BULK_MANAGER.md b/docs/en/BULK_MANAGER.md index 3838016..2d7a9b6 100644 --- a/docs/en/BULK_MANAGER.md +++ b/docs/en/BULK_MANAGER.md @@ -19,6 +19,15 @@ $config->getComponentByType('Colymba\\BulkManager\\BulkManager')->setConfig($ref The available configuration options are: * 'editableFields' : array of string referencing specific CMS fields available for editing +## Removing and Adding actions +To remove an action call removeBulkAction using the fully namespaced classname. +```php + $gridField->getConfig()->getComponentByType('\Colymba\BulkManager\BulkManager')->removeBulkAction(\Colymba\BulkManager\BulkAction\UnlinkHandler::class); +``` +To add an action: +```php + $gridField->getConfig()->getComponentByType('\Colymba\BulkManager\BulkManager')->addBulkAction(\Colymba\BulkManager\BulkAction\UnlinkHandler::class); +``` ## Custom actions You can remove or add individual action or replace them all via `addBulkAction()` and `removeBulkAction()`