vaszev / crud-bundle-lte
Installs: 129
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 1
Forks: 0
Open Issues: 0
Language:HTML
Type:symfony-bundle
Requires
- avanzu/admin-theme-bundle: ^1.3
- lexik/form-filter-bundle: ~5.0
- pagerfanta/pagerfanta: 1.0.*@dev
- sensio/generator-bundle: >2.2.0
README
#CRUD-LTE
##Modified Symfony3 CRUD-LTE generator
Many thanks to Jordi Llonch for his CrudGeneratorBundle (https://github.com/jordillonch/CrudGeneratorBundle) that I've could modify. This bundle has a nice backend view for your entities. You can filtering, paginating, ordering, soft-deleting your data.
###how to install: https://packagist.org/packages/vaszev/crud-bundle-lte
via composer:
$ composer install "vaszev/crud-lte-bundle":"~1.0"
in your AppKernel.php:
new Lexik\Bundle\FormFilterBundle\LexikFormFilterBundle(), new Vaszev\CrudLteBundle\VaszevCrudLteBundle(), new Avanzu\AdminThemeBundle\AvanzuAdminThemeBundle(),
###soft-delete Implementing the soft-delete interface, you have to extend your entity. The Base superclass will add the following fields to your entity: id, deleted, created, edited.
class Document extends Base {}
Now, you have to enable the filter in your config.yml file:
orm: filters: not_deleted: class: Vaszev\CrudLteBundle\Filter\NotDeletedFilter enabled: true avanzu_admin_theme: bower_bin: %bower_path%
And put the following into your parameters.yml file:
parameters: bower_path: 'c:\Users\anyone\AppData\Roaming\npm\bower'
###backend header-footer Let's create the following files:
app\Resources\views\vaszevCrudMenu.html.twig (contains your custom styles and the backend menu too)
{% block stylesheets_sub %}{% endblock %} {% block menu %}{% endblock %}
app\Resources\views\vaszevCrudFooter.html.twig (your personal/company informations goes here)
<footer></footer>
###final steps Don't forget to update your schema.
$ php bin/console assets:install --symlink
$ php bin/console doctrine:schema:update --force
$ php bin/console avanzu:admin:fetch-vendor
You're ready to go
$ php bin/console vaszev:generate:crud-lte