public function deleteAction(Request $request)
    {
        try {
            $manager = $this->get('ongr_settings.settings_manager');
            $manager->delete($request->get('name'));

            return new JsonResponse(['error' => false]);
        } catch (\Exception $e) {
            return new JsonResponse(
                [
                    'error' => true,
                    'message' => 'Error occurred please try to delete setting again.'
                ]
            );
        }
    }
public function deleteAction(Request $request)
    {
        try {
            $manager = $this->get('ongr_settings.settings_manager');
            $manager->delete($request->get('name'));

            return new JsonResponse(['error' => false]);
        } catch (\Exception $e) {
            return new JsonResponse(
                [
                    'error' => true,
                    'message' => 'Error occurred please try to delete setting again.'
                ]
            );
        }
    }
public function deleteAction ( Request $ request ) { try { $ manager = $ this -> get ( 'ongr_settings.settings_manager' ) ; $ manager -> delete ( $ request -> get ( 'name' ) ) ; return new JsonResponse ( [ 'error' => false ] ) ; } catch ( \ Exception $ e ) { return new JsonResponse ( [ 'error' => true , 'message' => 'Error occurred please try to delete setting again.' ] ) ; } }
Setting delete action

@param Request $request

@return JsonResponse
Setting delete action