eZ Publish 5.1+ comes with a Twig helper as a global variable named ezpublish
.
...
Property | Description |
---|---|
ezpublish.siteaccess | Returns the current siteaccess. |
ezpublish.rootLocation | Returns the root Location object |
ezpublish.requestedUriString | Returns the requested URI string (also known as semanticPathInfo). |
ezpublish.systemUriString | Returns the "system" URI string. System URI is the URI for internal content controller. If current route is not an URLAlias, then the current Pathinfo is returned. |
ezpublish.viewParameters | Returns the view parameters as a hash. |
ezpublish.viewParametersString | Returns the view parameters as a string. |
ezpublish.siteNamelegacy | Returns the name of the current siteaccesslegacy information. |
ezpublish.translationSiteAccess | Returns the translation SiteAccess for a given language, or null if it cannot be found. |
ezpublish.availableLanguages | Returns the list of available languages. |
ezpublish.legacyconfigResolver | Returns legacy informationthe config resolver. |
Legacy
Note |
---|
|
The ezpublish.legacy
property returns an object of type ParameterBag, which is a container for key/value pairs, and contains additional properties to retrieve/handle legacy information.
Property | Description | ||
---|---|---|---|
ezpublish.legacy.all | Returns all the parameters, with all the contained information. | ||
ezpublish.legacy.keys | Returns the parameter keys only. | ||
ezpublish.legacy. replace | Replaces the current parameters by a new set. | ||
ezpublish.legacy.add | Adds parameters. | ||
ezpublish.legacy.get | Returns a parameter by name. | ||
ezpublish.legacy. set | Sets a parameter by name. | ezpublish.legacy.has | Returns true if the parameter is defined. |
ezpublish.legacy.remove | Removes a parameter. | ||
ezpublish.legacy.getAlpha | Returns the alphabetic characters of the parameter value. | ||
ezpublish.legacy.getAlnum | Returns the alphabetic characters and digits of the parameter value. | ||
ezpublish.legacy.getDigits | Returns the digits of the parameter value. | ||
ezpublish.legacy.getInt | Returns the parameter value converted to integer. |
Listing the available parameters
...