protected function buildDataTablesResponse(Request $request, $name, ActionResponse $output) {

        if (true === $request->isXmlHttpRequest()) {
            return new JsonResponse($output);
        }

        // Notify the user.
        switch ($output->getStatus()) {

            case 200:
                $this->notifySuccess($output->getNotify());
                break;

            case 404:
                $this->notifyDanger($output->getNotify());
                break;

            case 500:
                $this->notifyWarning($output->getNotify());
                break;
        }

        return $this->redirectToRoute("jquery_datatables_index", ["name" => $name]);
    }
protected function buildDataTablesResponse(Request $request, $name, ActionResponse $output) {

        if (true === $request->isXmlHttpRequest()) {
            return new JsonResponse($output);
        }

        // Notify the user.
        switch ($output->getStatus()) {

            case 200:
                $this->notifySuccess($output->getNotify());
                break;

            case 404:
                $this->notifyDanger($output->getNotify());
                break;

            case 500:
                $this->notifyWarning($output->getNotify());
                break;
        }

        return $this->redirectToRoute("jquery_datatables_index", ["name" => $name]);
    }
protected function buildDataTablesResponse ( Request $ request , $ name , ActionResponse $ output ) { if ( true === $ request -> isXmlHttpRequest ( ) ) { return new JsonResponse ( $ output ) ; } // Notify the user. switch ( $ output -> getStatus ( ) ) { case 200 : $ this -> notifySuccess ( $ output -> getNotify ( ) ) ; break ; case 404 : $ this -> notifyDanger ( $ output -> getNotify ( ) ) ; break ; case 500 : $ this -> notifyWarning ( $ output -> getNotify ( ) ) ; break ; } return $ this -> redirectToRoute ( "jquery_datatables_index" , [ "name" => $ name ] ) ; }
Build a response.

@param Request $request The request.
@param string $name The provider name.
@param ActionResponse $output The output.
@return Response Returns the response.
Build a response .