[*] 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 -14
View File
@@ -84,20 +84,8 @@ class CartCore extends ObjectModel
protected static $_nbProducts = array();
protected static $_isVirtualCart = array();
protected $fieldsRequired = array('id_currency', 'id_lang');
protected $fieldsValidate = array(
'id_address_delivery' => 'isUnsignedId',
'id_carrier' => 'isUnsignedId',
'id_address_invoice' => 'isUnsignedId',
'id_currency' => 'isUnsignedId',
'id_customer' => 'isUnsignedId',
'id_guest' => 'isUnsignedId',
'id_lang' => 'isUnsignedId',
'recyclable' => 'isBool',
'gift' => 'isBool',
'gift_message' => 'isMessage',
'allow_seperated_package' => 'isBool'
);
protected $_products = null;
protected static $_totalWeight = array();
@@ -106,11 +94,28 @@ class CartCore extends ObjectModel
protected static $_taxes_rate = null;
protected static $_attributesLists = array();
/**
* @see ObjectModel::$definition
*/
public static $definition = array(
'table' => 'cart',
'primary' => 'id_cart',
'fields' => array(
'id_address_delivery' => array('type' => 'FILL_ME', 'validate' => 'isUnsignedId'),
'id_carrier' => array('type' => 'FILL_ME', 'validate' => 'isUnsignedId'),
'id_address_invoice' => array('type' => 'FILL_ME', 'validate' => 'isUnsignedId'),
'id_currency' => array('type' => 'FILL_ME', 'validate' => 'isUnsignedId', 'required' => true),
'id_customer' => array('type' => 'FILL_ME', 'validate' => 'isUnsignedId'),
'id_guest' => array('type' => 'FILL_ME', 'validate' => 'isUnsignedId'),
'id_lang' => array('type' => 'FILL_ME', 'validate' => 'isUnsignedId', 'required' => true),
'recyclable' => array('type' => 'FILL_ME', 'validate' => 'isBool'),
'gift' => array('type' => 'FILL_ME', 'validate' => 'isBool'),
'gift_message' => array('type' => 'FILL_ME', 'validate' => 'isMessage'),
'allow_seperated_package' => array('type' => 'FILL_ME', 'validate' => 'isBool'),
),
);
protected $webserviceParameters = array(
'fields' => array(
'id_address_delivery' => array('xlink_resource' => 'addresses'),