[*] 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
+21 -2
View File
@@ -41,14 +41,33 @@ class SpecificPriceCore extends ObjectModel
public $from;
public $to;
protected $fieldsRequired = array('id_product', 'id_shop', 'id_currency', 'id_country', 'id_group', 'price', 'from_quantity', 'reduction', 'reduction_type', 'from', 'to');
protected $fieldsValidate = array('id_group_shop' => 'isUnsignedId', 'id_product' => 'isUnsignedId', 'id_product_attribute' => 'isUnsignedId', 'id_shop' => 'isUnsignedId', 'id_country' => 'isUnsignedId', 'id_group' => 'isUnsignedId', 'price' => 'isPrice', 'from_quantity' => 'isUnsignedInt', 'reduction' => 'isPrice', 'reduction_type' => 'isReductionType', 'from' => 'isDateFormat', 'to' => 'isDateFormat');
/**
* @see ObjectModel::$definition
*/
public static $definition = array(
'table' => 'specific_price',
'primary' => 'id_specific_price',
'fields' => array(
'id_group_shop' => array('type' => 'FILL_ME', 'validate' => 'isUnsignedId'),
'id_product' => array('type' => 'FILL_ME', 'validate' => 'isUnsignedId', 'required' => true),
'id_product_attribute' => array('type' => 'FILL_ME', 'validate' => 'isUnsignedId'),
'id_shop' => array('type' => 'FILL_ME', 'validate' => 'isUnsignedId', 'required' => true),
'id_country' => array('type' => 'FILL_ME', 'validate' => 'isUnsignedId', 'required' => true),
'id_group' => array('type' => 'FILL_ME', 'validate' => 'isUnsignedId', 'required' => true),
'price' => array('type' => 'FILL_ME', 'validate' => 'isPrice', 'required' => true),
'from_quantity' => array('type' => 'FILL_ME', 'validate' => 'isUnsignedInt', 'required' => true),
'reduction' => array('type' => 'FILL_ME', 'validate' => 'isPrice', 'required' => true),
'reduction_type' => array('type' => 'FILL_ME', 'validate' => 'isReductionType', 'required' => true),
'from' => array('type' => 'FILL_ME', 'validate' => 'isDateFormat', 'required' => true),
'to' => array('type' => 'FILL_ME', 'validate' => 'isDateFormat', 'required' => true),
'id_currency' => array('type' => 'FILL_ME', 'required' => true),
),
);
protected static $_specificPriceCache = array();
protected static $_cache_priorities = array();