By default SonataAdminBundle doesn’t come with a PDF export functionality. Since this is a nice feature to have in your application here’s a way to add PDF export to the CRUD pages. The example works with the standard Symfony2 installation and the AcmeDemoBundle. The PDF will be generated using KnpSnappyBundle.
“Beautiful strings” is one of the proposed problems on Facebook Hacker Cup 2013 Qualification Round. The presented PHP solution was already validated.
In a Symfony2 project, Doctrine entities can be used inside Twig templates with the help of Twig extensions.
The example works with the standard Symfony2 installation and the AcmeDemoBundle.
WordPress posts may be randomly displayed using the “Get random results from a MySql table” tip placed in a simple plugin. What this plugin does is to simply ad the “RAND()” value to “ORDER BY” clause in the sql query which retrieves the WordPress posts.