mwsimple / crud-generator
This bundle generates code cute for you
Installs: 2 564
Dependents: 0
Suggesters: 0
Security: 0
Stars: 15
Watchers: 9
Forks: 10
Open Issues: 3
Language:HTML
Type:symfony-bundle
Requires
- knplabs/knp-paginator-bundle: 2.4.2
- lexik/form-filter-bundle: v2.0.2
- sensio/generator-bundle: 2.3.*
- symfony/symfony: ~2.3
This package is auto-updated.
Last update: 2024-11-10 11:23:29 UTC
README
This bundle generates code cute you extending SensioGeneratorBundle using KnpPaginatorBundle and Boostrap Templates.
Installation
Using composer
Add following lines to your composer.json
file:
Symfony 2.3.9 + Include Boostrap 3
"require": { ... "mwsimple/crud-generator": "v2.3.9" }
Symfony > 2.3.6 + Include Boostrap 2
"require": { ... "mwsimple/crud-generator": "dev-2.3-bootstrap2" }
Symfony 2.3.3
"require": { ... "mwsimple/crud-generator": "v2.3.3" }
Symfony 2.3.1 - 2.3.2
"require": { ... "mwsimple/crud-generator": "v2.3.2" }
Execute:
php composer.phar update "mwsimple/crud-generator"
Add it to the AppKernel.php
class:
// ... new MWSimple\Bundle\CrudGeneratorBundle\MWSimpleCrudGeneratorBundle(), new Knp\Bundle\PaginatorBundle\KnpPaginatorBundle(), new Lexik\Bundle\FormFilterBundle\LexikFormFilterBundle(),
Configuration paginator example
You can configure config.yml
default query parameter names and templates
knp_paginator: page_range: 5 # default page range used in pagination control default_options: page_name: page # page query parameter name sort_field_name: sort # sort field query parameter name sort_direction_name: direction # sort direction query parameter name distinct: true # ensure distinct results, useful when ORM queries are using GROUP BY statements template: pagination: KnpPaginatorBundle:Pagination:twitter_bootstrap_v3_pagination.html.twig # bootstrap 3 sliding pagination controls template sortable: KnpPaginatorBundle:Pagination:sortable_link.html.twig # sort link template
Configuration filter example
You can configure config.yml
find Twig Configuration
twig: ... form: resources: - LexikFormFilterBundle:Form:form_div_layout.html.twig
Configure translations (include en, es, ca)
You can configure config.yml
framework: ... translator: { fallback: %locale% } # uncomment line
Install assets
app/console assets:install
Dependencies
This bundle extends SensioGeneratorBundle and add a paginator using KnpPaginatorBundle and filter using LexikFormFilterBundle .
Usage
Use following command from console:
app/console mwsimple:generate:crud
Author
Gonzalo Alonso - gonkpo@gmail.com
Bootstrap 3
Tito Canteros - titocanteros@gmail.com
.