ezsystems/ezp-next — pull request #206 by lolautruche (2013-01-18 10:42:43+00:00)
Title: Implemented EZP-19948 - Global variable available in twig

**This PR is a work in progress**. Please refer to the task list below.

The point of this PR is to expose *global* information in a helper service, available from any template, just as it was possible in eZ Publish 4.x with [variables in pagelayout](http://doc.ez.no/eZ-Publish/Technical-manual/4.x/Templates/The-pagelayout/Variables-in-pagelayout).

The legacy part is meant to increase backward compatibility with 4.x and ease migration to 5.x.

##TODO

- [x] Expose the helper as an **ezpublish** Twig global variable (helper is a service)
- [x] Expose base information (*siteaccess*, *requestedUriString*, *systemUriString*, *viewParameters*)
- [ ] Add a *legacy* property (**ezpublish.legacy**) from *EzPublishLegacyBundle*
- [ ] Expose base *legacy* information, when available (legacy kernel booted) : *ezinfo*, *navigation_part*, *ui_component*, *ui_context*
- [ ] Expose *legacy* persistent variable
- [ ] Expose *legacy* CSS/JS resources requested through `ezscript_require()` and `ezcss_require()`