예제 #1
0
 public function homeAction(Request $request)
 {
     $action = new GetFeaturedBooksAction($this->app);
     $page = (int) $request->query->get('page', 1);
     $qb = $action->handle();
     $pagination = $this->app['dezull.dbal_paginator']->paginate($qb, $page, 5);
     $categories = GetAllCategoriesHelper::help(1);
     return $this->app['twig']->render('home.twig', ['categories' => $categories, 'pagination' => $pagination]);
 }
예제 #2
0
 public function viewFeaturedBooksAction(Request $request)
 {
     $action = new GetFeaturedBooksAction($this->app);
     $page = (int) $request->query->get('page', 1);
     $qb = $action->handle();
     $pagination = $this->app['dezull.dbal_paginator']->paginate($qb, $page, 5);
     return $this->app['twig']->render('admin/viewFeaturedBooks.twig', ['pagination' => $pagination, 'requestCount' => GetBorrowRequestCountHelper::help(), 'countOfBorrowing' => GetCountOfBookInBorrowingHelper::help()]);
 }