// Context part 7

This commit is contained in:
tDidierjean
2011-07-15 13:59:26 +00:00
parent c8acd7a824
commit 6e93cc2848
24 changed files with 101 additions and 163 deletions
+6 -1
View File
@@ -65,10 +65,14 @@ class EmployeeCore extends ObjectModel
/** @var boolean Status */
public $active = 1;
/** @var boolean show screencast */
public $show_screencast = 1;
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_uimode' => 'isGenericName');
'passwd' => 'isPasswdAdmin', 'active' => 'isBool', 'id_profile' => 'isInt', 'bo_color' => 'isColor', 'bo_theme' => 'isGenericName',
'bo_uimode' => 'isGenericName', 'show_screencast' => 'isBool');
protected $table = 'employee';
protected $identifier = 'id_employee';
@@ -108,6 +112,7 @@ class EmployeeCore extends ObjectModel
$fields['bo_theme'] = pSQL($this->bo_theme);
$fields['bo_uimode'] = pSQL($this->bo_uimode);
$fields['active'] = (int)$this->active;
$fields['show_screencast'] = (int)$this->show_screencast;
return $fields;
}