kernel/private/classes/ezplanguageswitcher.php

Show: inherited
Table of Contents

File containing the ezpLanguageSwitcher class

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  

\ezpLanguageSwitcher

Package: Default

Utility class for transforming URLs between siteaccesses.

This class will generate URLs for various siteaccess, and translate URL-aliases into other languages as necessary.

Parent(s)
\ezpLanguageSwitcherCapable

Properties

Propertyprotected  $baseDestinationUrl= ''
Details
Type
n/a
Propertyprotected  $destinationLocale= ''
Details
Type
n/a
Propertyprotected  $destinationSiteAccess= ''
Details
Type
n/a
Propertyprotected  $destinationSiteAccessIni= ''
Details
Type
n/a
Propertyprotected  $origUrl= ''
Details
Type
n/a
Propertyprotected  $userParamString= ''
Details
Type
n/a

Methods

methodpublic__construct(  $params = null ) : void

Parameters
Name Type Description
$params
methodpublicdestinationUrl( ) : void

Returns URL alias for the specified $locale

methodprotectedgetSiteAccessIni( ) : void

Get instance siteaccess specific site.ini

methodprotectedisLocaleAvailableAsFallback( ) : bool

Checks if the current content object locale is available in destination siteaccess.

This is used to check whether we should pass on the original URL to the destination translation siteaccess, when no translation of an object exists in the destination locale.

If the current content object locale exists as a fallback in the destination siteaccess, the original URL should be available there as well.

Returns
Type Description
bool
methodprotectedisUrlPointingToModule( string $url ) : bool

Checks if the given $url points to a module.

We use this method to check whether we should pass on the original URL to the destination translation siteaccess.

Parameters
Name Type Description
$url string
Returns
Type Description
bool
methodpublicprocess( ) : void

This is a hook which is called by the language switcher module on implementation classes.

In this implementation it is doing initialisation as an example.

methodpublicsetDestinationSiteAccess( string $saName ) : void

Sets the siteaccess name, $saName, we want to redirect to.

Parameters
Name Type Description
$saName string
methodpublicsetupTranslationSAList( string $url = null ) : void
static

Creates an array of corresponding language switcher links and logical names.

This mapping is set up in site.ini.[RegionalSettings].TranslationSA. The purpose of this method is to assist creation of language switcher links into the available translation siteaccesses on the system.

This is used by the language_switcher template operator.

Parameters
Name Type Description
$url string
Documentation was generated by DocBlox 0.18.1.