eZ Publish  [4.2]
eZTemplateLocaleOperator Class Reference

Locale aware conversions and output using operator "l10n". More...

List of all members.

Public Member Functions

 currentDateTransformation ($operatorName, &$node, $tpl, &$resourceData, $element, $lastElement, $elementList, $elementTree, &$parameters)
 dateTimeTransformation ($operatorName, &$node, $tpl, &$resourceData, $element, $lastElement, $elementList, $elementTree, &$parameters)
 eZTemplateLocaleOperator ()
 getTimeTransformation ($operatorName, &$node, $tpl, &$resourceData, $element, $lastElement, $elementList, $elementTree, &$parameters)
 l10nTransformation ($operatorName, &$node, $tpl, &$resourceData, $element, $lastElement, $elementList, $elementTree, &$parameters)
 makeDateTimeTransformation ($operatorName, &$node, $tpl, &$resourceData, $element, $lastElement, $elementList, $elementTree, &$parameters)
 modify ($tpl, $operatorName, $operatorParameters, $rootNamespace, $currentNamespace, &$operatorValue, $namedParameters, $placement)
 namedParameterList ()
 namedParameterPerOperator ()
 operatorList ()
 operatorTemplateHints ()

Public Attributes

 $CurrentDateName
 $DateTimeName
 $Locale
 A reference to the locale object.
 $LocaleName
 $Operators
 The operator array.

Detailed Description

Locale aware conversions and output using operator "l10n".

This class takes care of converting variables and displaying them according to their locale settings. The class has one operator called l10n (short for localization) which takes one parameter which is localization type. Supported types are time, shorttime, date, shortdate, currency and number.

// Example template code
{$curdate|l10n(date)}
{$cash|l10n(currency)}

Definition at line 49 of file eztemplatelocaleoperator.php.


Member Function Documentation

eZTemplateLocaleOperator::currentDateTransformation ( operatorName,
&$  node,
tpl,
&$  resourceData,
element,
lastElement,
elementList,
elementTree,
&$  parameters 
)

Definition at line 288 of file eztemplatelocaleoperator.php.

eZTemplateLocaleOperator::dateTimeTransformation ( operatorName,
&$  node,
tpl,
&$  resourceData,
element,
lastElement,
elementList,
elementTree,
&$  parameters 
)

Definition at line 239 of file eztemplatelocaleoperator.php.

eZTemplateLocaleOperator::eZTemplateLocaleOperator ( )

Initializes the object with the default locale.

Note:
Add support for specifying the locale object.

Definition at line 55 of file eztemplatelocaleoperator.php.

eZTemplateLocaleOperator::getTimeTransformation ( operatorName,
&$  node,
tpl,
&$  resourceData,
element,
lastElement,
elementList,
elementTree,
&$  parameters 
)

Definition at line 323 of file eztemplatelocaleoperator.php.

eZTemplateLocaleOperator::l10nTransformation ( operatorName,
&$  node,
tpl,
&$  resourceData,
element,
lastElement,
elementList,
elementTree,
&$  parameters 
)

Transforms

Definition at line 147 of file eztemplatelocaleoperator.php.

eZTemplateLocaleOperator::makeDateTimeTransformation ( operatorName,
&$  node,
tpl,
&$  resourceData,
element,
lastElement,
elementList,
elementTree,
&$  parameters 
)

Definition at line 296 of file eztemplatelocaleoperator.php.

eZTemplateLocaleOperator::modify ( tpl,
operatorName,
operatorParameters,
rootNamespace,
currentNamespace,
&$  operatorValue,
namedParameters,
placement 
)

Converts the variable according to the locale type. Allowed types are:

  • time
  • shorttime
  • date
  • shortdate
  • currency
  • clean_currency
  • number

Definition at line 372 of file eztemplatelocaleoperator.php.

eZTemplateLocaleOperator::namedParameterList ( )
eZTemplateLocaleOperator::namedParameterPerOperator ( )
Returns:
true to tell the template engine that the parameter list exists per operator type.

Definition at line 115 of file eztemplatelocaleoperator.php.

eZTemplateLocaleOperator::operatorList ( )

Returns array with l10n.

Definition at line 70 of file eztemplatelocaleoperator.php.

eZTemplateLocaleOperator::operatorTemplateHints ( )

Returns a list with hints for the template compiler.

Definition at line 78 of file eztemplatelocaleoperator.php.


Member Data Documentation

eZTemplateLocaleOperator::$CurrentDateName

Definition at line 537 of file eztemplatelocaleoperator.php.

eZTemplateLocaleOperator::$DateTimeName

Definition at line 536 of file eztemplatelocaleoperator.php.

eZTemplateLocaleOperator::$Locale

A reference to the locale object.

Definition at line 533 of file eztemplatelocaleoperator.php.

eZTemplateLocaleOperator::$LocaleName

Definition at line 535 of file eztemplatelocaleoperator.php.

eZTemplateLocaleOperator::$Operators

The operator array.

Definition at line 531 of file eztemplatelocaleoperator.php.


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