code/CMSBatchActionHandler.php
public function handleConfirmation($request)
    {
        // Find the action handler
        $action = $request->param('BatchAction');
        $actionHandler = $this->actionByName($action);

        // Sanitise ID list and query the database for apges
        $csvIDs = $request->requestVar('csvIDs');
        $ids = $this->cleanIDs($csvIDs);

        // Check dialog
        if ($actionHandler->hasMethod('confirmationDialog')) {
            $response = new HTTPResponse(json_encode($actionHandler->confirmationDialog($ids)));
        } else {
            $response = new HTTPResponse(json_encode(array('alert' => false)));
        }

        $response->addHeader("Content-type", "application/json");
        return $response;
    }
public function handleConfirmation($request)
    {
        // Find the action handler
        $action = $request->param('BatchAction');
        $actionHandler = $this->actionByName($action);

        // Sanitise ID list and query the database for apges
        $csvIDs = $request->requestVar('csvIDs');
        $ids = $this->cleanIDs($csvIDs);

        // Check dialog
        if ($actionHandler->hasMethod('confirmationDialog')) {
            $response = new HTTPResponse(json_encode($actionHandler->confirmationDialog($ids)));
        } else {
            $response = new HTTPResponse(json_encode(array('alert' => false)));
        }

        $response->addHeader("Content-type", "application/json");
        return $response;
    }
public function handleConfirmation ( $ request ) { // Find the action handler $ action = $ request -> param ( 'BatchAction' ) ; $ actionHandler = $ this -> actionByName ( $ action ) ; // Sanitise ID list and query the database for apges $ csvIDs = $ request -> requestVar ( 'csvIDs' ) ; $ ids = $ this -> cleanIDs ( $ csvIDs ) ; // Check dialog if ( $ actionHandler -> hasMethod ( 'confirmationDialog' ) ) { $ response = new HTTPResponse ( json_encode ( $ actionHandler -> confirmationDialog ( $ ids ) ) ) ; } else { $ response = new HTTPResponse ( json_encode ( array ( 'alert' => false ) ) ) ; } $ response -> addHeader ( "Content-type" , "application/json" ) ; return $ response ; }
Check if this action has a confirmation step

@param HTTPRequest $request
@return HTTPResponse
Check if this action has a confirmation step