[*] 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
+24 -19
View File
@@ -109,25 +109,9 @@ class CustomerCore extends ObjectModel
public $groupBox;
protected $fieldsRequired = array('lastname', 'passwd', 'firstname', 'email');
protected $fieldsSize = array('lastname' => 32, 'passwd' => 32, 'firstname' => 32, 'email' => 128, 'note' => 65000);
protected $fieldsValidate = array(
'secure_key' => 'isMd5',
'lastname' => 'isName',
'firstname' => 'isName',
'email' => 'isEmail',
'passwd' => 'isPasswd',
'id_gender' => 'isUnsignedId',
'birthday' => 'isBirthDate',
'newsletter' => 'isBool',
'optin' => 'isBool',
'active' => 'isBool',
'note' => 'isCleanHtml',
'is_guest' => 'isBool',
'id_shop' => 'isUnsignedId',
'id_group_shop' => 'isUnsignedId',
'groupBox' => 'isArrayWithIds'
);
protected $webserviceParameters = array(
'fields' => array(
@@ -141,11 +125,32 @@ class CustomerCore extends ObjectModel
),
);
/**
* @see ObjectModel::$definition
*/
public static $definition = array(
'table' => 'customer',
'primary' => 'id_customer',
'fields' => array(
'secure_key' => array('type' => 'FILL_ME', 'validate' => 'isMd5'),
'lastname' => array('type' => 'FILL_ME', 'validate' => 'isName', 'required' => true, 'size' => 32),
'firstname' => array('type' => 'FILL_ME', 'validate' => 'isName', 'required' => true, 'size' => 32),
'email' => array('type' => 'FILL_ME', 'validate' => 'isEmail', 'required' => true, 'size' => 128),
'passwd' => array('type' => 'FILL_ME', 'validate' => 'isPasswd', 'required' => true, 'size' => 32),
'id_gender' => array('type' => 'FILL_ME', 'validate' => 'isUnsignedId'),
'birthday' => array('type' => 'FILL_ME', 'validate' => 'isBirthDate'),
'newsletter' => array('type' => 'FILL_ME', 'validate' => 'isBool'),
'optin' => array('type' => 'FILL_ME', 'validate' => 'isBool'),
'active' => array('type' => 'FILL_ME', 'validate' => 'isBool'),
'note' => array('type' => 'FILL_ME', 'validate' => 'isCleanHtml', 'size' => 65000),
'is_guest' => array('type' => 'FILL_ME', 'validate' => 'isBool'),
'id_shop' => array('type' => 'FILL_ME', 'validate' => 'isUnsignedId'),
'id_group_shop' => array('type' => 'FILL_ME', 'validate' => 'isUnsignedId'),
'groupBox' => array('type' => 'FILL_ME', 'validate' => 'isArrayWithIds'),
),
);
protected static $_defaultGroupId = array();
protected static $_customerHasAddress = array();
protected static $_customer_groups = array();