脚本宝典收集整理的这篇文章主要介绍了php – 您已请求合成服务(“请求”). DIC不知道如何构建此服务,脚本宝典觉得挺不错的,现在分享给大家,也给大家做个参考。
在composer.json中添加“knplabs / knp-paginator-bundle”:“~2.5.3”后收到错误并运行更新.
public function listingAction(Request $request) { $em = $this->getDoctrine()->getManager(); $list = $em->getReposITory('Avtostil\SharedBundle\Entity\Gallery')->findAll(); $paginator = $this->get('knp_paginator'); $pagination = $paginator->paginate($list,$request->query->getInt('page',1)/* page number */,3/* limit PEr page */); $pagination->setUsedRoute(\Avtostil\SharedBundle\Entity\Page::GALLERY_LISTING); /* QUICK AND DIRTY */ $data = []; $data['galleries'] = $pagination; echo "<PRe>"; \Doctrine\Common\Util\Debug::dump('here'); die(); return $this->render('AvtostilOpenBundle:Gallery:listing.htML.twig',$data); }
in appDevDebugProjectContainer.PHP line 4094 at appDevDebugProjectContainer->getRequestService() in bootstrap.PHP.cache line 2189 at Container->get('request','2') in appDevDebugProjectContainer.PHP line 7503 at appDevDebugProjectContainer->synchronizeRequestService() in bootstrap.PHP.cache line 2125 at Container->set('request',null,'request') in bootstrap.PHP.cache line 3278 at ContainerAwareHttpKernel->handle(object(Request),'1',true) in bootstrap.PHP.cache line 2479 at Kernel->handle(object(Request)) in app_dev.PHP line 29
以上是脚本宝典为你收集整理的php – 您已请求合成服务(“请求”). DIC不知道如何构建此服务全部内容,希望文章能够帮你解决php – 您已请求合成服务(“请求”). DIC不知道如何构建此服务所遇到的问题。
本图文内容来源于网友网络收集整理提供,作为学习参考使用,版权属于原作者。
如您有任何意见或建议可联系处理。小编QQ:384754419,请注明来意。