eZPublish  4.5
eZTemplateLocaleOperator Class Reference

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

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. More...
 
 $LocaleName
 
 $Operators
 The operator array. More...
 

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)}

Member Function Documentation

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

Initializes the object with the default locale.

Note
Add support for specifying the locale object.
eZTemplateLocaleOperator::getTimeTransformation (   $operatorName,
$node,
  $tpl,
$resourceData,
  $element,
  $lastElement,
  $elementList,
  $elementTree,
$parameters 
)
eZTemplateLocaleOperator::l10nTransformation (   $operatorName,
$node,
  $tpl,
$resourceData,
  $element,
  $lastElement,
  $elementList,
  $elementTree,
$parameters 
)

Transforms

eZTemplateLocaleOperator::makeDateTimeTransformation (   $operatorName,
$node,
  $tpl,
$resourceData,
  $element,
  $lastElement,
  $elementList,
  $elementTree,
$parameters 
)
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
eZTemplateLocaleOperator::namedParameterList ( )
eZTemplateLocaleOperator::namedParameterPerOperator ( )
Returns
true to tell the template engine that the parameter list exists per operator type.
eZTemplateLocaleOperator::operatorList ( )

Returns array with l10n.

eZTemplateLocaleOperator::operatorTemplateHints ( )

Returns a list with hints for the template compiler.

Member Data Documentation

eZTemplateLocaleOperator::$CurrentDateName
eZTemplateLocaleOperator::$DateTimeName
eZTemplateLocaleOperator::$Locale

A reference to the locale object.

eZTemplateLocaleOperator::$LocaleName
eZTemplateLocaleOperator::$Operators

The operator array.

Referenced by operatorList().


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