承接 pkshetlie/pagination-bundle 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

pkshetlie/pagination-bundle

Composer 安装命令:

composer require pkshetlie/pagination-bundle

包简介

Easy way to make html table with paginations

README 文档

README

composer require pkshetlie/pagination-bundle

add to AppKernel.php

[ 
       ...
       new Pkshetlie\PaginationBundle\PaginationBundle(), 
       ... 
]

Add to config.yml

imports:
  ...
  - { resource: "@PaginationBundle/Resources/config/services.yml" }

installation is done.

Exemple Usage

in some Dummy controller

class DummyController extends Controller{

   public function indexAction(Request $request){
       $qb = $this->getDoctrine()->getReposiitory('DummyBundle:DummyEntity')->createQueryBuilder('x');
       
       // you can add some 
       /*
       $qb->orderBy( ... )
       $qb->where( ... )
       ...
       */        
       
       $pagination = $this->get('pkshetlie.pagination')->process($qb, $request);
       
       return $this->render('DummyBundle:Dummy:index.html.twig',[
       'pagination'=> $pagination,
       ]);
   }

}

in the index.html.twig

{% import '@Pagination/Pagination/macro.twig' as macro_pagination %}

<table>
{% for entity in pagination.entities %}
   {# ... your stuff with <tr> / <td> #}
{% endfor %}
</table>

{# draw the pagination #}
{{ macro_pagination.paginate(pagination) }}

that's all !

统计信息

  • 总下载量: 546
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 3
  • 点击次数: 0
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 2
  • Watchers: 1
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: GPL-3.0-or-later
  • 更新时间: 2018-03-26

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固