PHP Class eZ\Publish\Core\MVC\Symfony\Templating\GlobalHelper

Container is injected to be sure to lazy load underlying services and to avoid scope conflict.
Datei anzeigen Open project: ezsystems/ezpublish-kernel Class Usage Examples

Protected Properties

Property Type Description
$configResolver eZ\Publish\Core\MVC\ConfigResolverInterface
$locationService eZ\Publish\API\Repository\LocationService
$router Symfony\Component\Routing\RouterInterface
$translationHelper eZ\Publish\Core\Helper\TranslationHelper

Public Methods

Method Description
__construct ( eZ\Publish\Core\MVC\ConfigResolverInterface $configResolver, eZ\Publish\API\Repository\LocationService $locationService, Symfony\Component\Routing\RouterInterface $router, TranslationHelper $translationHelper )
getAvailableLanguages ( ) : array Returns the list of available languages.
getConfigResolver ( ) : eZ\Publish\Core\MVC\ConfigResolverInterface Returns the config resolver.
getRequestedUriString ( ) : string Returns the requested URI string (aka semanticPathInfo).
getRootLocation ( ) : eZ\Publish\API\Repository\Values\Content\Location Returns the root location.
getSiteaccess ( ) : SiteAccess | null Returns the current siteaccess.
getSystemUriString ( ) : null | string Returns the "system" URI string.
getTranslationSiteAccess ( string $language ) : null | string Returns the translation SiteAccess for $language, or null if it cannot be found.
getViewParameters ( ) : array | null Returns the view parameters as a hash.
getViewParametersString ( ) : string Returns the view parameters as a string.

Method Details

__construct() public method

public __construct ( eZ\Publish\Core\MVC\ConfigResolverInterface $configResolver, eZ\Publish\API\Repository\LocationService $locationService, Symfony\Component\Routing\RouterInterface $router, TranslationHelper $translationHelper )
$configResolver eZ\Publish\Core\MVC\ConfigResolverInterface
$locationService eZ\Publish\API\Repository\LocationService
$router Symfony\Component\Routing\RouterInterface
$translationHelper eZ\Publish\Core\Helper\TranslationHelper

getAvailableLanguages() public method

Returns the list of available languages.
public getAvailableLanguages ( ) : array
return array

getConfigResolver() public method

Returns the config resolver.
public getConfigResolver ( ) : eZ\Publish\Core\MVC\ConfigResolverInterface
return eZ\Publish\Core\MVC\ConfigResolverInterface

getRequestedUriString() public method

Returns the requested URI string (aka semanticPathInfo).
public getRequestedUriString ( ) : string
return string

getRootLocation() public method

Returns the root location.
public getRootLocation ( ) : eZ\Publish\API\Repository\Values\Content\Location
return eZ\Publish\API\Repository\Values\Content\Location

getSiteaccess() public method

Returns the current siteaccess.
public getSiteaccess ( ) : SiteAccess | null
return eZ\Publish\Core\MVC\Symfony\SiteAccess | null

getSystemUriString() public method

System URI is the URI for internal content controller. E.g. /content/location/123/full. If current route is not an URLAlias, then the current Pathinfo is returned.
public getSystemUriString ( ) : null | string
return null | string

getTranslationSiteAccess() public method

Returns the translation SiteAccess for $language, or null if it cannot be found.
public getTranslationSiteAccess ( string $language ) : null | string
$language string
return null | string

getViewParameters() public method

Returns the view parameters as a hash.
public getViewParameters ( ) : array | null
return array | null

getViewParametersString() public method

e.g. /(foo)/bar.
public getViewParametersString ( ) : string
return string

Property Details

$configResolver protected_oe property

protected ConfigResolverInterface,eZ\Publish\Core\MVC $configResolver
return eZ\Publish\Core\MVC\ConfigResolverInterface

$locationService protected_oe property

protected LocationService,eZ\Publish\API\Repository $locationService
return eZ\Publish\API\Repository\LocationService

$router protected_oe property

protected RouterInterface,Symfony\Component\Routing $router
return Symfony\Component\Routing\RouterInterface

$translationHelper protected_oe property

protected TranslationHelper,eZ\Publish\Core\Helper $translationHelper
return eZ\Publish\Core\Helper\TranslationHelper