petkopara / PetkoparaCrudGeneratorBundle

Symfony3 CRUD generator bundle with pagination, filter, bulk actions and Twitter bootstrap 3.3.6 features.
MIT License
70 stars 17 forks source link
bulk-actions crud-generator form-filter multi-search pagination symfony twitter-bootstrap

CrudGeneratorBundle

Symfony3 CRUD generator bundle with pagination, filtering, Twitter bootstrap 3.3.6 markup and many other features. It's Simple to use and fully customizable.

Designed to bring back the functionality of the old Symfony 1.4 admin generator, but extending from SensioGeneratorBundle with additional options and features.

Build Status SensioLabsInsight Latest Stable Code Coverage Scrutinizer Code Quality Total Downloads

Features

Screenshots

Multi Search Filter

Screenshot

Form Filter

Screenshot

Installation

This bundle is compatible with Symfony 2.8/3.0 or higher.

Using composer

Symfony >= 2.8

composer require petkopara/crud-generator-bundle

Register the CRUD and filter bundles in your AppKernel.php:

new Lexik\Bundle\FormFilterBundle\LexikFormFilterBundle(),
new Petkopara\MultiSearchBundle\PetkoparaMultiSearchBundle(),
new Petkopara\CrudGeneratorBundle\PetkoparaCrudGeneratorBundle(),

Install the assets.

php bin/console assets:install --symlink

For the bootstrap theme of the forms, add this to your app/config/config.yml

twig:
    form_themes:
    - 'bootstrap_3_layout.html.twig' 

Optionally if you are using your own base template, be sure that you include the javascript file of the bundle in it.

<script src="https://github.com/petkopara/PetkoparaCrudGeneratorBundle/raw/master/{{ asset('bundles/petkoparacrudgenerator/js/petkopara-crud-generator.js') }}"></script>

Dependencies

This bundle extends SensioGeneratorBundle. Pagination with PagerFanta . For the filtering is used PetkoparaMutiSearchBundle and LexikFormFilterBundle.

Usage

Use the following command from console:

php bin/console petkopara:generate:crud

And follow the wizard steps.

Available new options

The default behavior of the bundle is to generate full featured crud, but you can customize what to be generated or not. The bundle adds few new parameters compared to the doctrine crud generator, to control all of the new features.

Don't forget, that this is a just crud generator and you are free to change everything generated from this bundle.

Templates

Every generated file is based on a template. There are default templates but they can be overridden by placing custom templates in one of the following locations, by order of priority:

BUNDLE_PATH/Resources/PetkoparaCrudGeneratorBundle/skeleton/crud
APP_PATH/Resources/PetkoparaCrudGeneratorBundle/skeleton/crud

And

BUNDLE_PATH/Resources/PetkoparaCrudGeneratorBundle/skeleton/form
APP_PATH/Resources/PetkoparaCrudGeneratorBundle/skeleton/form

Author

Petko Petkov - petkopara at gmail dot com

License

CrudGeneratorBundle is licensed under the MIT License.