The AdmingeneratorGeneratorBundle is an open source admin-generator for the famous Symfony2 php framework.
The bundle generates PHP code in the cache directory, that can be easily read and understand. You can create all the functionality of an admin site, including:
All this from one simple file.
Edge cases are pushed far back since extensibility is at the heart of the architecture. All components outlined above can be overridden by using standard inheritance (for controllers, Twig Templates and forms) or using the normal configuration setup in Symfony (routing for example).
The primary goal is to simply and rapidly build an entire admin site. But additionally this can:
You can create your first web application using the generator without writing a single line of code. Then learn Symfony and examine or use the generated code even in a front end application.
The generator is really an integration component across bundles and Symfony components. It is envisaged that eventually the Symfony community could extend the class generator with the core team to be more universal. For example integration with a CMS. But we need your help to get this production ready. All contributions are very welcome.
Simply you create a YAML file and in conjunction with your model metadata (ODM or ORM or Propel) generates: routing, form classes, the controllers and Twig template files. The rest of the documentation shows just how flexible and easy this is. Take a look at the YAML file that shows the creation of an entire site:
generator: admingenerator.generator.doctrine
params:
model: Admingenerator\DemoBundle\Entity\Movie
namespace_prefix: Admingenerator
bundle_name: DemoBundle
fields:
is_published:
help: If you want to see this content on you website
actors:
filterOn: actors.id
producer:
label: Producer name
sort_on: producer.name
getter: producer.name
addFormOptions:
property: name
release_date:
formType: birthday
addFormOptions:
years:
.range:
from: <?php echo date("Y"); ?>
to: 1950
step: 1
builders:
list:
params:
title: Here is a beautiful title no ???
display: [ id, title, is_published, producer, release_date ]
max_per_page: 3
actions:
new: ~
object_actions:
edit: ~
delete: ~
filters:
params:
fields:
release_date:
formType: date_range
display: [ title, is_published, producer, actors, release_date]
new:
params:
title: You're creating a new movie
display: [ title, is_published, producer, actors, release_date ]
actions:
list: ~
edit:
params:
title: You're editing the movie ""
display:
"NONE": [ title, release_date ]
"Other informations": [ is_published, producer, actors ]
actions:
list: ~
delete: ~


Found a typo ? Something is wrong in this documentation ? Just fork and edit it !