dev-master
9999999-devDjango style autogenerated admin interface from Doctrine ORM entities
MIT
The Requires
by Charles Larson
symfony2 crud doctrine symfony admin django
Django style autogenerated admin interface from Doctrine ORM entities
The admin bundle should install as a bundle using composer. If you try to do this, I would appreciate your feedback. Composer does not run on the shared server where my development is hosted. It takes to long to run and the job gets aborted before completion., (*1)
As an alternative to composer, use the following steps:, (*2)
1) Place the CRL/AdminBundle directory with CRL rooted either in /Symfony/src or in /Symfony/vendor/bundles. From the CRL directory, checkout into this directory by doing: git clone https://github.com/charlar/symfony-admin.git/ AdminBundle 2) In Symfony/web/AppKernal.php, in register bundles add: new CRL\AdminBundle\CRLAdminBundle(), (depending on the version of symfony, you may have to manually edit the Autoloads file. 3) In routing.yml (or routing_dev.yml) add: _admin: resource: "@CRLAdminBundle/Controller/AdminController.php" type: annotation prefix: /admin
1) Navigate to /admin, you will get a list of Entities. 2) each data object will have a link to view structure, browse data and add. 3) if you browse data, you will get a list of data objects. the objects will be listed by id, or by the data returned from __toString(), if it is implemented on the Entity 4) clicking on the entity will allow you to edit it. 5) from the data object main page, clicking add, will allow you to create a new object
No configuration is required. However you can add configuration to create browseing layouts for your entities. The is also a switch called hash to create shorter urls for your entites using hashes intead of hex encoded strings. The configurations are not currently used., (*3)
1) If not all fields of your entity have a get function, Symfony will crash when you try to edit that entity. (Fix added, but now crashes 2.0 symfony) 2) If you have a entity with a one-to-one or one-to-many relationship and the target entity does not have a __toString() function defined, Symfony will crash when you try to edit the primary entity.
This is a proof of concept, and certainly rife with bugs. Contributions are welcome. I wish a well developed version of this had been part of the standard Symfony distribution, like Django has a built in admin package., (*4)
Django style autogenerated admin interface from Doctrine ORM entities
MIT
symfony2 crud doctrine symfony admin django