This bundle can be installed using Composer. Tell composer to install the extension:
$ php composer.phar require prezent/grid-bundle
Then, activate the bundle (Symfony 4+):
<?php
// config/bundles.php
return [
// ...
Prezent\GridBundle\PrezentGridBundle::class => ['all' => true],
];
or (Symfony 3):
<?php
// app/AppKernel.php
public function registerBundles()
{
$bundles = array(
// ...
new Prezent\GridBundle\PrezentGridBundle(),
);
}
Since the prezent/grid
library depends on the Twig string-extra extension, you have to load it in your project.
// config/services.yml
...
services:
Twig\Extra\String\StringExtension:
tags:
- { name: twig.extension }
or you can use the twig/extra-bundle on Symfony 4+. See the documentation for that bundle on how to install it.
You can set the themes which will be used by the renderer:
prezent_grid:
themes:
- @PrezentGrid/grid/grid.html.twig
- @MyBundle/grid/custom.html.twig