eZPublishCommunityProject(LegacyStack)  2013.6
editcurrency.php File Reference

Namespaces

 kernel
 Autoloader definition for eZ Publish Kernel files.
 

Functions

 validateCurrencyData (&$currencyData)
 Validates currency data: More...
 

Variables

 $canEdit = true
 
 $currencyParams
 
 $error = false
 
 $ini = eZINI::instance( 'site.ini' )
 
 $module = $Params['Module']
 
 $originalCurrencyCode = $Params['Currency']
 
if($module->isCurrentAction(
'Cancel')) else if($module->
isCurrentAction( 'Create'))
else if($module->
isCurrentAction( 'StoreChanges')) 
$pathText = ''
 
 $Result = array()
 
 $Result ['content'] = $tpl->fetch( "design:shop/editcurrency.tpl" )
 
 $Result ['path']
 
 $tpl = eZTemplate::factory()
 
if(strlen($originalCurrencyCode) > 0) else
 

Function Documentation

validateCurrencyData ( $currencyData)

Validates currency data:

  • checks that custom_rate_value & rate_factor are provided and are floats.
Parameters
array$currencyDataCurrenty data as submitted. Will be modified to remove invalid values since it is passed by reference
Returns
false|string True if data is valid, an error message if it's not

Variable Documentation

$canEdit = true
$currencyParams
Initial value:
= array( 'code' => false,
'symbol' => false,
'locale' => $ini->variable( 'RegionalSettings', 'Locale' ),
'custom_rate_value' => '0.0000',
'rate_factor' => '1.0000' )
$ini
Definition: ezgeneratetranslationcache.php:58

Referenced by eZShopFunctions\createCurrency().

$ini = eZINI::instance( 'site.ini' )
$module = $Params['Module']
$originalCurrencyCode = $Params['Currency']
if ($module->isCurrentAction( 'Cancel')) else if ($module->isCurrentAction( 'Create')) else if ($module->isCurrentAction( 'StoreChanges')) $pathText = ''
$Result = array()
$Result['content'] = $tpl->fetch( "design:shop/editcurrency.tpl" )
$Result['path']
Initial value:
= array( array( 'text' => $pathText,
'url' => false ) )
if($module->isCurrentAction( 'Cancel')) else if($module->isCurrentAction( 'Create')) else if($module->isCurrentAction( 'StoreChanges')) $pathText
Definition: editcurrency.php:88
if (strlen($originalCurrencyCode) > 0) else
Initial value:
{
$pathText = ezpI18n::tr( 'kernel/shop', 'Create new currency' )
static tr($context, $source, $comment=null, $arguments=null)
Translates the source $source with context $context and optional comment $comment and returns the tra...
Definition: ezpi18n.php:86
if($module->isCurrentAction( 'Cancel')) else if($module->isCurrentAction( 'Create')) else if($module->isCurrentAction( 'StoreChanges')) $pathText
Definition: editcurrency.php:88