Add the directory to your composer.json as below:
"require": {
...
"lamari/grid": "dev-master"
}
Update/install with this command:
php composer.phar update lamari/grid
register the bundle
public function registerBundles()
{
$bundles = array(
...
new Lamari\GridLBundle\GridLBundle(),
);
add this under import in config.yml
- { resource: "@GridLBundle/Resources/config/services.yml" }
Under routing.yml :
gridL_rout:
resource: "@GridLBundle/Resources/config/routing.yml"
prefix: /
One action is requiered to have a nice grid ! by default
public function yourAction()
{
return $this->get("grid.entity_wrapper")->defaultGrid("SomeBundle:SomeEntity","SomeBundle:someView:EntityView.html.twig");
);
<link rel="stylesheet" type="text/css" media="screen" href="{{ asset ('bundles/gridl/css/jquery-ui-1.10.4.custom.min.css') }}" />
<link rel="stylesheet" type="text/css" media="screen" href="{{ asset ('bundles/gridl/css/ui.jqgrid.css') }}" />
<script src="{{ asset ('bundles/gridl/js/jquery-1.11.0.min.js') }}" type="text/javascript"></script>
<script src="{{ asset ('bundles/gridl/js/i18n/grid.locale-en.js') }}" type="text/javascript"></script>
<script src="{{ asset ('bundles/gridl/js/jquery.jqGrid.min.js') }}" type="text/javascript"></script>
{{ jqgridL(grid)}}