SilverStripe\Admin\CMSBatchAction
A class representing back actions.
See CMSMain.BatchActions.js on how to add custom javascript
functionality.
<code>
CMSMain::register_batch_action('publishitems', new CMSBatchAction('doPublish',
_t('CMSBatchActions.PUBLISHED_PAGES', 'published %d pages')));
</code>
Synopsis
class CMSBatchAction
{
- // members
- protected $managedClass = SiteTree::class;
- // methods
- public abstract void getActionTitle()
- public abstract string run()
- public string response()
- public string batchaction()
- public array applicablePagesHelper()
- public void getParameterFields()
- public void canView()
- public array applicablePages()
Hierarchy
Uses
- SilverStripe\Core\Injector\Injectable
Members
protected
- $managedClass
Methods
public
- applicablePages() — Given a list of object IDs, filter out which items can have this batch action applied to them.
- applicablePagesHelper() — Helper method for applicablePages() methods. Acts as a skeleton implementation.
- batchaction() — Helper method for processing batch actions.
- canView() — If you wish to restrict the batch action to some users, overload this function.
- getActionTitle() — The the text to show in the dropdown for this action
- getParameterFields()
- response() — Helper method for responding to a back action request
- run() — Run this action for the given set of pages.