How to show or access cookie values in Symfony Twig views

Strange how obscure it is to find a clear example of how to just access or show the value of a cookie in Twig, so here it is! Twig is the templating engine that powers Symfony views.  Symfony is the PHP framework from Sensio Labs. If you are a company that uses open-source software…

Looping through all request variables in a Symfony Twig view

Here is a quick way to access all request variables and output them in a Symfony Twig view:  

Symfony MySQL Doctrine Mapping Field Type Definitions: TinyInt’s a Boolean, Any Kind of “Text” is Just “text” and Other “Gotchas”

A MySQL "tinyint" field, regardless of length, is mapped as a boolean in Symfony's MySQL DBAL platform.  Good to know, so when you start typing in those Doctrine ORM mapping files in annotation or my preferred way, YML files, you won't get a fatal error because you didn't define the field properly. Here's a list…

Symfony Framework: Calling on other controllers from your TWIG views handy and efficient

In the newest versions of Symfony greater than 2.2 you can embed output from controller by calling it with this handy TWIG snippet: Check out Sensio Lab's documentation to learn more. This is especially useful if you want to create a snippet that will deliver content independent of the controller you are calling the…

Accessing dynamic field names in Symfony’s TWIG using attribute and the tilde(~)

At last, a framework has finally given the tilde (~) a little respect. Hash tag (#) usually gets all the glory, but not this time!  Not is in this case.  Granted, the tilde might be happy to be used at all and chances are, this obscure solution to another view issue doesn't mean tilde's ready…