$data, 'recordsTotal' => $count, 'recordsFiltered' => $count, ] ); return; } if ($delete === true) { $id = get_parameter('id'); try { $console = new Console($id); $console->delete(); $console->save(); echo json_encode(['result' => __('Console successfully deleted')]); } catch (Exception $e) { echo json_encode(['result' => $e->getMessage()]); } return; }