Version: current

# Class CMSBatchAction

A class representing back actions

    CMSMain::register_batch_action('publishitems', new CMSBatchAction('doPublish',
            _t('CMSBatchActions.PUBLISHED_PAGES', 'published %d pages')));

  SS_Object
  CMSBatchAction

### Direct known subclasses

`CMSBatchAction_Delete`, `CMSBatchAction_DeleteFromLive`, `CMSBatchAction_Publish`

Abstract
Package: cms\batchaction
Located at cms/code/CMSBatchAction.php

## Methods summary

`abstract public` | # `getActionTitle( )` The the text to show in the dropdown for this action The the text to show in the dropdown for this action
`abstract public` | # `getDoingText( )` Get text to be shown while the action is being processed, of the form "publishing pages". Get text to be shown while the action is being processed, of the form "publishing pages".
`abstract public` | # `run( `DataObjectSet` $pages )` Run this action for the given set of pages. Return a set of status-updated JavaScript to return to the CMS. Run this action for the given set of pages. Return a set of status-updated JavaScript to return to the CMS.
`public` | # `batchaction( `DataObjectSet` $pages, mixed $helperMethod, mixed $successMessage, mixed $arguments = array() )` Helper method for processing batch actions. Returns a set of status-updating JavaScript to return to the CMS. Helper method for processing batch actions. Returns a set of status-updating JavaScript to return to the CMS. #### Parameters $pages $pages The DataObjectSet of SiteTree objects to perform this batch action on. $helperMethod $helperMethod The method to call on each of those objects. $successMessage $arguments
`public` | # `applicablePagesHelper( mixed $ids, mixed $methodName, mixed $checkStagePages = true, mixed $checkLivePages = true )` Helper method for applicablePages() methods. Acts as a skeleton implementation. Helper method for applicablePages() methods. Acts as a skeleton implementation. #### Parameters $ids $ids The IDs passed to applicablePages $methodName $methodName The canXXX() method to call on each page to check if the action is applicable $checkStagePages $checkStagePages Set to true if you want to check stage pages $checkLivePages $checkLivePages Set to true if you want to check live pages (e.g, for deleted-from-draft)
`public` | # `getParameterFields( )`
`public` | # `canView( )` If you wish to restrict the batch action to some users, overload this function. If you wish to restrict the batch action to some users, overload this function.

### Magic methods summary

[Raise a SilverStripe Framework issue/bug](https://github.com/silverstripe/silverstripe-framework/issues/new)
- [Raise a SilverStripe CMS issue/bug](https://github.com/silverstripe/silverstripe-cms/issues/new)
- Please use the Silverstripe Forums to ask development related questions. -