[*] BO : #PSFV-94 - new controller for AdminOrders

This commit is contained in:
aFolletete
2011-10-21 13:53:54 +00:00
parent d060f0a4e4
commit 3f76a8f1c4
12 changed files with 1342 additions and 1057 deletions
+17 -5
View File
@@ -341,12 +341,13 @@ class AddressFormatCore extends ObjectModel
return $tab;
}
/*
/**
* Generates the full address text
* @address is an instanciate object of Address class
* @patternrules is a defined rules array to avoid some pattern
* @newLine is a string containing the newLine format
* @separator is a string containing the separator format
* @param address is an instanciate object of Address class
* @param patternrules is a defined rules array to avoid some pattern
* @param newLine is a string containing the newLine format
* @param separator is a string containing the separator format
* @return string
*/
public static function generateAddress(Address $address, $patternRules = array(), $newLine = "\r\n", $separator = ' ', $style = array())
{
@@ -375,6 +376,17 @@ class AddressFormatCore extends ObjectModel
return $addressText;
}
public static function generateAddressSmarty($params, &$smarty)
{
return self::generateAddress(
$params['address'],
(isset($params['patternRules']) ? $params['patternRules'] : array()),
(isset($params['newLine']) ? $params['newLine'] : "\r\n"),
(isset($params['separator']) ? $params['separator'] : ''),
(isset($params['style']) ? $params['style'] : array())
);
}
/**
* Returns selected fields required for an address in an array according to a selection hash
* @return array String values