In XSolve each developer has 10% of his working time to create special projects and bring some innovative ideas into life. Most often we use that time to prepare open source bundles and you can find some of them at http://knpbundles.com/organization/xsolve-pl/profile . Please feel free to use them!
In this article I would like to present our brand new creation – Symfony2 Boostrap CRUD bundle and make it easy for you to implement it in your next assignment.
Symfony2 Bootstrap CRUD bundle
When you start a new project without prepared graphic design, probably you will decide to use Twitter Bootstrap as your layout base. And that’s ok – usually in XSolve we choose the same option. But unfortunately problem appears when you wish to generate CRUD logic for new entities. SensioGeneratorBundle which is responsible for that task is not purposed to work with Bootstrap and requires a lot of work with twigs files to make them look good.
After a few projects we’ve decided to create our own, open source bundle which could handle this issue – xsolve-bootstrap-crud-bundle.
This bundle allows developers to generate well prepared CRUD actions for Bootstrap Twitter. It’s working in the same way as Sensio generator but there are two new commands available from command line:
What we expected from this little module was quick installation at the beginning of the project. So, I’d like to present you how to accomplish installation and achieve nice looking design after 15 minutes.
Just after clear Symfony2 installation (you can use composer create-project symfony/framework-standard-edition) you need to add new requirement to the composer. You can choose between two versions dev-master and v1.0.0 . The latter is stable.Of course, after successful installation you have to add new dependencies to app/AppKernel.php fileWe are almost at the end of the configuration. One last thing is to extend example layout and generate assets and assetics in the project.And regenerate assets and cache:
There may occur one problem with installing jquery library. Composer might not recognize it as a stable version. In this case please add to composer.json file a new repository:
There might also happen some issues with less (css engine). To install it please follow an installation instruction and add configuration to app/config/config.yml
I hope you’ll find our little improvement useful and I would also like to encourage all of you to create your own bundles and to share them with the community for the sake of more efficient work. As always, I wait for your questions and comments.