/** * @return void Odesle odpoved pro DataTables */ public function handleProcessArticles() { $offset = $this->getParameter('start', 0); $limit = $this->getParameter('length', 10); $draw = $this->getParameter('draw', 1); $limits = ['limit' => $limit, 'offset' => $offset]; $total = $this->articleRepository->countAllArticles(); $myArticles = $this->articleRepository->findAllArticles($limits); $articles = $this->parseArticles($myArticles); $answer = ['draw' => $draw, 'recordsTotal' => $total, 'recordsFiltered' => $total, 'data' => $articles]; $this->sendJson($answer); }