symfony/symfony — pull request #5964 by brandonwamboldt (2012-11-09 17:02:50+00:00)
Title: [TwigBridge] added the ability to set the default theme for all forms in a template

The `form_theme` tag now optionally accepts the `_context` variable as an argument instead of a specific form variable. If the `_context variable` is passed, all form variables in the context will have their default theme set according to the tag

**Example:**

```
{% form_theme _context 'CustomFormBundle:Form:form_theme.html.twig' %}
```

**Issue Report:** Issue #5550

This is implemented by changing the way Twig cache files are generated, so that if the variable passed to the tag is not a `FormView` object but an array, the array is looped through and any `FormView` objects will have their default theme set.