[*] 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 -5
View File
@@ -67,17 +67,31 @@ class EmployeeCore extends ObjectModel
public $remote_addr;
protected $fieldsRequired = array('lastname', 'firstname', 'email', 'passwd', 'id_profile', 'id_lang');
protected $fieldsSize = array('lastname' => 32, 'firstname' => 32, 'email' => 128, 'passwd' => 32, 'bo_color' => 32, 'bo_theme' => 32);
protected $fieldsValidate = array('lastname' => 'isName', 'firstname' => 'isName', 'email' => 'isEmail', 'id_lang' => 'isUnsignedInt',
'passwd' => 'isPasswdAdmin', 'active' => 'isBool', 'id_profile' => 'isInt', 'bo_color' => 'isColor', 'bo_theme' => 'isGenericName',
'bo_show_screencast' => 'isBool');
/**
* @see ObjectModel::$definition
*/
public static $definition = array(
'table' => 'employee',
'primary' => 'id_employee',
'fields' => array(
'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),
'id_lang' => array('type' => 'FILL_ME', 'validate' => 'isUnsignedInt', 'required' => true),
'passwd' => array('type' => 'FILL_ME', 'validate' => 'isPasswdAdmin', 'required' => true, 'size' => 32),
'active' => array('type' => 'FILL_ME', 'validate' => 'isBool'),
'id_profile' => array('type' => 'FILL_ME', 'validate' => 'isInt', 'required' => true),
'bo_color' => array('type' => 'FILL_ME', 'validate' => 'isColor', 'size' => 32),
'bo_theme' => array('type' => 'FILL_ME', 'validate' => 'isGenericName', 'size' => 32),
'bo_show_screencast' => array('type' => 'FILL_ME', 'validate' => 'isBool'),
),
);
protected $webserviceParameters = array(
'fields' => array(
'id_lang' => array('xlink_resource' => 'languages'),