Exponential Basic 2.4.0.1 Exponential Basic CMS — PHP Class Reference

ezplanguageswitcheroperator.php
Go to the documentation of this file.
1 <?php
12 class ezpLanguageSwitcherOperator
13 {
14 function __construct()
15 {
16 }
17
18 function operatorList()
19 {
20 return array( 'language_switcher' );
21 }
22
23 function namedParameterPerOperator()
24 {
25 return true;
26 }
27
28 function namedParameterList()
29 {
30 return array( 'language_switcher' => array( 'destination' => array( 'type' => 'string',
31 'required' => false,
32 'default' => '' ) ) );
33 }
34
35 function modify( $tpl, $operatorName, $operatorParameters, $rootNamespace, $currentNamespace, &$operatorValue, $namedParameters, $placement )
36 {
37 $destination = $namedParameters['destination'];
38
39 switch ( $operatorName )
40 {
41 case 'language_switcher':
42 {
43 $ini = eZINI::instance();
44 if ( !$ini->hasVariable( 'RegionalSettings', 'LanguageSwitcherClass' ) )
45 {
46 return;
47 }
48
49 // Append original query string if no query string has already been passed in $destination
50 if ( strpos( $destination, '?' ) === false )
51 $destination .= eZSys::queryString();
52
53 $className = $ini->variable( 'RegionalSettings', 'LanguageSwitcherClass' );
54 $operatorValue = call_user_func( array( $className, 'setupTranslationSAList' ), $destination );
55 } break;
56 }
57 }
58 }
59
60 ?>
eZSys\queryString
static queryString()
Definition: ezsys.php:608
$ini
$ini
Definition: classes/admin/linklist.php:64
ezpLanguageSwitcherOperator
Definition: ezplanguageswitcheroperator.php:13
ezpLanguageSwitcherOperator\namedParameterList
namedParameterList()
Definition: ezplanguageswitcheroperator.php:28
ezpLanguageSwitcherOperator\operatorList
operatorList()
Definition: ezplanguageswitcheroperator.php:18
ezpLanguageSwitcherOperator\namedParameterPerOperator
namedParameterPerOperator()
Definition: ezplanguageswitcheroperator.php:23
ezpLanguageSwitcherOperator\__construct
__construct()
Definition: ezplanguageswitcheroperator.php:14
ezpLanguageSwitcherOperator\modify
modify( $tpl, $operatorName, $operatorParameters, $rootNamespace, $currentNamespace, &$operatorValue, $namedParameters, $placement)
Definition: ezplanguageswitcheroperator.php:35
$tpl
$tpl
Definition: mailtofriend.php:58
Copyright © 1998 – 2026 7x. All rights reserved. Licensed under the GNU GPLv2+.