/** * @return void Odesle odpoved pro DataTables */ public function handleProcessVotes() { $offset = $this->getParameter('start', 0); $limit = $this->getParameter('length', 10); $draw = $this->getParameter('draw', 1); $limits = ['limit' => $limit, 'offset' => $offset]; $total = $this->voteRepository->countAllVotes(); $myVotes = $this->voteRepository->findAllVotes($limits); $votes = $this->parseVotes($myVotes); $answer = ['draw' => $draw, 'recordsTotal' => $total, 'recordsFiltered' => $total, 'data' => $votes]; $this->sendJson($answer); }