dev-master
9999999-dev https://github.com/vaszev/crud
MIT
The Requires
by Roland Bodnar
crud 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., (*1)
https://packagist.org/packages/vaszev/crud-bundle, (*2)
via composer:, (*3)
$ composer install "vaszev/crud-bundle":"~2.0"
in your AppKernel.php:, (*4)
new Lexik\Bundle\FormFilterBundle\LexikFormFilterBundle(), new Vaszev\CrudBundle\VaszevCrudBundle(),
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., (*5)
class Document extends Base {}
Now, you have to enable the filter in your config.yml file:, (*6)
orm: filters: not_deleted: class: Vaszev\CrudBundle\Filter\NotDeletedFilter enabled: true
Let's create the following files:, (*7)
app\Resources\views\vaszevCrudMenu.html.twig (contains your custom styles and the backend menu too), (*8)
{% block stylesheets_sub %}{% endblock %} {% block menu %}{% endblock %}
app\Resources\views\vaszevCrudFooter.html.twig (your personal/company informations goes here), (*9)
<footer></footer>
Don't forget to update your schema., (*10)
$ php app/console doctrine:schema:update --force
You're ready to go, (*11)
$ php app/console vaszev:generate:crud
MIT
crud generator