eZPublish(LegacyStack)  5.1
ezpLanguageSwitcherCapable Interface Reference
+ Inheritance diagram for ezpLanguageSwitcherCapable:

Public Member Functions

 __construct ($params=null)
 Constructs a ezpLanguageSwitcherCapable object. More...
 
 destinationUrl ()
 Calculates the full destination URL. More...
 
 process ()
 This is added to serve as a hook, and can be used as seen fit. More...
 
 setDestinationSiteAccess ($destinationSiteAccess)
 Sets the name of the destination translation siteaccess. More...
 

Static Public Member Functions

static setupTranslationSAList ($url=null)
 Creates array structure for iterating over language switcher URLs in templates. More...
 

Constructor & Destructor Documentation

ezpLanguageSwitcherCapable::__construct (   $params = null)

Constructs a ezpLanguageSwitcherCapable object.

The $params array is the module-params array returned in the switchlanguage/to view. In addition, the value in $params['QueryString'] might also be taken into account (if present) to keep the query string while redirecting to another language. This is used to construct the destination URL.

Parameters
array$params
Returns
ezpLanguageSwitcherCapable

Implemented in ezpLanguageSwitcher.

Member Function Documentation

ezpLanguageSwitcherCapable::destinationUrl ( )

Calculates the full destination URL.

The returned URL consists of correct hostname and URL alias for translated content.

Returns
string

Implemented in ezpLanguageSwitcher.

ezpLanguageSwitcherCapable::process ( )

This is added to serve as a hook, and can be used as seen fit.

The default implementation perform some initialisation logic here.

Returns
void

Implemented in ezpLanguageSwitcher.

ezpLanguageSwitcherCapable::setDestinationSiteAccess (   $destinationSiteAccess)

Sets the name of the destination translation siteaccess.

This name is picked up and passed on in the switchlanguage module.

Parameters
string$destinationSiteAccess
Returns
void

Implemented in ezpLanguageSwitcher.

static ezpLanguageSwitcherCapable::setupTranslationSAList (   $url = null)
static

Creates array structure for iterating over language switcher URLs in templates.

This method uses the site.ini.[RegionalSettings].TranslationSA setting to build an array of the defined translation siteaccess, their language switcher URL and chosen text string representing that translation.

Example return value: Array ( ????????[eng] => Array ????????????????( ????????????????????????[url] => /switchlanguage/to/eng/Demo-content ????????????????????????[text] => Eng ????????????????)

????????[nor] => Array ????????????????( ????????????????????????[url] => /switchlanguage/to/nor/Demo-content ????????????????????????[text] => Nor ????????????????) )

Parameters
string$url
Returns
mixed

Implemented in ezpLanguageSwitcher.


The documentation for this interface was generated from the following file: