24 articles Symfony Page 3 / 5

Fabien Potencier is a mad genius, he’s the man behind Sensio Labs and the Symfony PHP framework, which I have grown to really appreciate. For one, any business with a web development team needs to be on a framework. Period. Collaboration will improve exponentially while development time will decrease as your systems become more stable and scalable. PHP frameworks are a necessity for any company with serious skin in the web!

Looking for a PHP developer, a Symfony expert or Wordpress web developer? Perhaps a business system architect that specializes in scalable MySQL business system design and deployment? We have reliable, fast and professional developers that meets your organization’s needs! Contact us for your next web development project and schedule a free consultation today.

Updates for Symfony 2.5 PHP Framework Cheatsheet

The following updates were made to the Symfony Cheatsheet but warrant its own post here for cleaner reference: To generate entities from an existing Symfony database, you must first have Doctrine introspect the database, then generate the entities. Watch out for your database relationships, they will probably need to be edited, getting your Doctrine table…

Cookie basics for Symfony, Sensio Labs PHP framework

In Symfony, here is how you "get cookies": Don't forget to include the class path: Setting cookie values in Symfony is pretty straight forward, the thing to know is that since Symfony processes so much in its front controllers you can set cookies deeper into your code than other methods where headers are…

Symfony Doctrine’s version of MySQL’s “IN” — as in “values contained in”

MySQL's "IN" query filter is very useful. Basically, if you have a list of record ID numbers, you can query them all neatly like so: The containing comma-delimited list is a simple and neat query that can be assembled in your code quickly. Duplicating MySQL's "IN( )" in Doctrine is just as easy, you…

Grabbing Symfony TWIG template output as a string to use in string-based HTML bodies such as email templates, etc.

Amazing, but this solution is so simple and it is no where on Stack Overflow. There's a lot more documentation about rendering templates from a string but not TO a string, something very helpful if you want to use templating to build html output for things like email templates.

Creating a credit card month/year form field input in Symfony 2.5

Creating a credit card month/year input can be accomplished with a single database field but Symfony is smart enough to create multiple pull downs for each.  It is NOT smart enough to not require the programmer to exclude the "day" value.  So, what do you do?  There are many workarounds, including using some post rendering…