kernel/private/interfaces/ezplanguageswitchercapable.php
File containing the ezpLanguageSwitcherCapable interface
- Copyright
- Copyright (C) 1999-2011 eZ Systems AS. All rights reserved.
- License
- eZ Business Use License Agreement Version 2.0
- Package
- kernel
- Version
- 4.6.0
\ezpLanguageSwitcherCapable
Interface for classes providing language switcher functionality.
- Children
- \ezpLanguageSwitcher
Methods


__construct(
array $params
=
null
)
:
\ezpLanguageSwitcherCapable
Constructs a ezpLanguageSwitcherCapable object.
The $params array is the module-params array returned in the switchlanguage/to view. This is used to construct the destination URL.
Name | Type | Description |
---|---|---|
$params | array |
Type | Description |
---|---|
\ezpLanguageSwitcherCapable |


destinationUrl(
)
:
string
Calculates the full destination URL.
The returned URL consists of correct hostname and URL alias for translated content.
Type | Description |
---|---|
string |


process(
)
:
void
This is added to serve as a hook, and can be used as seen fit.
The default implementation perform some initialisation logic here.


setDestinationSiteAccess(
string $destinationSiteAccess
)
:
void
Sets the name of the destination translation siteaccess.
This name is picked up and passed on in the switchlanguage module.
Name | Type | Description |
---|---|---|
$destinationSiteAccess | string |


setupTranslationSAList(
string $url
=
null
)
:
mixed
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
)
)
Name | Type | Description |
---|---|---|
$url | string |
Type | Description |
---|---|
mixed |