コード例 #1
0
ファイル: Front.php プロジェクト: akiu/silex-perpustakaan
 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
ファイル: Back.php プロジェクト: akiu/silex-perpustakaan
 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()]);
 }