Exponential Basic 2.4.0.1 Exponential Basic CMS — PHP Class Reference

Public Member Functions | Static Public Member Functions | List of all members
ezpLanguageSwitcherCapable Interface Reference
Inheritance diagram for ezpLanguageSwitcherCapable:

## Public Member Functions
| __construct ( $params=null)
| setDestinationSiteAccess ( $destinationSiteAccess)
| process ()
| destinationUrl ()

## Static Public Member Functions
static | setupTranslationSAList ( $url=null)

## Detailed Description

Definition at line 17 of file ezplanguageswitchercapable.php.

## Constructor & Destructor Documentation

## ◆ __construct()

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

## ◆ destinationUrl()

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.

## ◆ process()

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.

## ◆ setDestinationSiteAccess()

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.

## ◆ setupTranslationSAList()

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:

- ezplanguageswitchercapable.php

Copyright © 1998 – 2026 7x. All rights reserved. Licensed under the GNU GPLv2+.