Generic entity management bundle.
The goal of this bundle is to enable basic CRUD actions on database entities using a single controller and series of views for any entity.
Disclaimer : this bundle is far from complete, untested, and not supposed to be used in a production environment, ever!
- Bootstrap 3
- DataTables
Add the repo to the composer.json
:
{
"repositories": [
{
"type": "git",
"url": "https://github.com/vctls/entity-bundle.git"
}
]
}
Add the bundle to composer.json
:
{
"require-dev": {
"vctls/entity-bundle": "dev-master"
}
}
Run composer update
<?php
// app/AppKernel.php
// ...
class AppKernel extends Kernel
{
// ...
public function registerBundles()
{
// ...
if (in_array($this->getEnvironment(), array('dev', 'test'), true)) {
// ...
$bundles[] = new Vctls\EntityBundle\VctlsEntityBundle();
);
// ...
}
}
Also, enable KnpMenuBundle in dev or prod, in order for the menu builder service to work!
Complete routing_dev.yml
:
vctls_entity:
resource: "@VctlsEntityBundle/Resources/config/routing.yml"
prefix: /
Enter the index route manually, or use the integrated Menu builder to create a menu to access all your entities.
By default, the index route is /entity/index/{entityName}
. Use the entity alias, like AppBundle:MyEntity
.