lamari / grid
Symfony2 wrapper for jqGrid plugin
Installs: 64
Dependents: 0
Suggesters: 0
Security: 0
Stars: 2
Watchers: 2
Forks: 0
Open Issues: 3
Language:JavaScript
Requires
- php: >=5.3.3
- doctrine/common: >=2.1,<2.4.x-dev
- twig/twig: >=1.8,<2.0-dev
This package is not auto-updated.
Last update: 2024-05-25 14:36:49 UTC
README
Installation :
Composer (this is for Symfony > 2.3)
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
Step 2: Enable the bundle
register the bundle
public function registerBundles() { $bundles = array( ... new Lamari\GridLBundle\GridLBundle(), );
How to Use
Configuration :
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: /
Controller :
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"); );
View :
<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)}}