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;
    }