private function getReturnTo(Request $request, Button $button)
    {
        $name = $button->getName();
        $isAjax = $request->isXmlHttpRequest();
        if ($request->attributes->has('_test')) {
            return 'test';
        }
        if ($name === 'save') {
            return $isAjax ? 'ajax' : $name;
        }

        return $name;
    }
private function getReturnTo(Request $request, Button $button)
    {
        $name = $button->getName();
        $isAjax = $request->isXmlHttpRequest();
        if ($request->attributes->has('_test')) {
            return 'test';
        }
        if ($name === 'save') {
            return $isAjax ? 'ajax' : $name;
        }

        return $name;
    }
private function getReturnTo ( Request $ request , Button $ button ) { $ name = $ button -> getName ( ) ; $ isAjax = $ request -> isXmlHttpRequest ( ) ; if ( $ request -> attributes -> has ( '_test' ) ) { return 'test' ; } if ( $ name === 'save' ) { return $ isAjax ? 'ajax' : $ name ; } return $ name ; }
Calculate the parameter used to determine response.

@internal to be removed when forms cut-over is complete

@param Request $request
@param Button  $button

@return string
Calculate the parameter used to determine response .