mqm / pagination-bundle
Symfony PaginationBundle
Installs: 31
Dependents: 0
Suggesters: 0
Security: 0
Stars: 1
Watchers: 2
Forks: 1
Open Issues: 0
Type:symfony-bundle
Requires
- php: >=5.3.2
- symfony/framework-bundle: 2.*
- symfony/security-bundle: 2.*
Suggests
- doctrine/couchdb-odm-bundle: *
- symfony/doctrine-bundle: *
- symfony/mongodb-odm-bundle: *
This package is not auto-updated.
Last update: 2024-12-15 03:46:43 UTC
README
What is MQMPaginationBundle ?
MQMPagination Bundle is a Symfony2 bundle that lets you build pagination into your website.
This bundle is part of [MQMShoppingBox][1], a bunch of bundles to help you build e-commerce sites out of the box.
Check [ShoppingBox] for see this bundle on action.
Requirements
This bundle takes advantages of some libraries and bundles. You will need:
- [DoctrineExtensions][2] for sluggable and tree extensions (configuration needed described below in Installation).
Installation
Add MQMPaginationBundle to your vendors:
You have two options, by modifying your dep file or creating a submodule
- Option 1: Editing deps file:
//deps
// ...
[PaginationBundle]
git=http://github.com/mqmtech/PaginationBundle.git
target=/bundles/MQM/PaginationBundle
$ php bin/vendors update
- Option 2: submodule command
$ git submodule add git://github.com/mqmtech/PaginationBundle.git vendor/bundles/MQM/PaginationBundle
Add PaginationBundle to your autoload:
// app/autoload.php
$loader->registerNamespaces(array(
// ...
'MQM' => __DIR__.'/../vendor/bundles',
// ...
));
Add PaginationBundle to your application kernel:
// app/AppKernel.php
public function registerBundles()
{
$bundles = array(
// ...
new MQM\Bundles\PaginationBundle\MQMPaginationBundle(),
);
// ...
return $bundles;
}
Add MQMPaginationBundle routing rules to your application (this should be the last entry of routing.yml):
# app/config/routing.yml
# ...
MQMPaginationBundle:
resource: "@MQMPaginationBundle/Resources/config/routing.yml"
prefix: /
Add assets to your web directory:
$ ./app/console assets:install --symlink web
Rebuild the model and update your schema:
$ ./app/console doctrine:generate:entities
$ ./app/console doctrine:schema:update --force
Configuration
# app/config/config.yml
mqm_pagination:
limit_per_page: 6