[*] Classes: Remove $fieldsRequired, $fieldsSize and $fieldsValidate (and lang properties) properties, use $definition instead

git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@11155 b9a71923-0436-4b27-9f14-aed3839534dd
This commit is contained in:
rMalie
2011-12-12 18:10:38 +00:00
parent c97bac9160
commit fddf4fb89b
92 changed files with 1495 additions and 854 deletions
+19 -4
View File
@@ -59,17 +59,32 @@ class CurrencyCore extends ObjectModel
/** @var int bool active */
public $active;
protected $fieldsRequired = array('name', 'iso_code', 'sign', 'conversion_rate', 'format', 'decimals');
protected $fieldsSize = array('name' => 32, 'iso_code' => 3, 'iso_code_num' => 3, 'sign' => 8);
protected $fieldsValidate = array('name' => 'isGenericName', 'iso_code' => 'isLanguageIsoCode', 'iso_code_num' => 'isNumericIsoCode', 'blank' => 'isInt', 'sign' => 'isGenericName',
'format' => 'isUnsignedId', 'decimals' => 'isBool', 'conversion_rate' => 'isFloat', 'deleted' => 'isBool', 'active' => 'isBool');
/**
* @see ObjectModel::$definition
*/
public static $definition = array(
'table' => 'currency',
'primary' => 'id_currency',
'multilang' => true,
'fields' => array(
'name' => array('type' => 'FILL_ME', 'validate' => 'isGenericName', 'required' => true, 'size' => 32),
'iso_code' => array('type' => 'FILL_ME', 'validate' => 'isLanguageIsoCode', 'required' => true, 'size' => 3),
'iso_code_num' => array('type' => 'FILL_ME', 'validate' => 'isNumericIsoCode', 'size' => 3),
'blank' => array('type' => 'FILL_ME', 'validate' => 'isInt'),
'sign' => array('type' => 'FILL_ME', 'validate' => 'isGenericName', 'required' => true, 'size' => 8),
'format' => array('type' => 'FILL_ME', 'validate' => 'isUnsignedId', 'required' => true),
'decimals' => array('type' => 'FILL_ME', 'validate' => 'isBool', 'required' => true),
'conversion_rate' => array('type' => 'FILL_ME', 'validate' => 'isFloat', 'required' => true),
'deleted' => array('type' => 'FILL_ME', 'validate' => 'isBool'),
'active' => array('type' => 'FILL_ME', 'validate' => 'isBool'),
),
);
/** @var array Currency cache */
static protected $currencies = array();