[*] Classes: Remove $fieldsRequired, $fieldsSize and $fieldsValidate (and lang properties) properties, use $definition instead

This commit is contained in:
rMalie
2011-12-12 18:10:38 +00:00
parent 7ca01e1619
commit 1c39ab4685
92 changed files with 1495 additions and 854 deletions
+16 -6
View File
@@ -40,19 +40,29 @@ class ContactCore extends ObjectModel
public $customer_service;
protected $fieldsRequired = array();
protected $fieldsSize = array('email' => 128);
protected $fieldsValidate = array('email' => 'isEmail', 'customer_service' => 'isBool');
protected $fieldsRequiredLang = array('name');
protected $fieldsSizeLang = array('name' => 32);
protected $fieldsValidateLang = array('name' => 'isGenericName', 'description' => 'isCleanHtml');
/**
* @see ObjectModel::$definition
*/
public static $definition = array(
'table' => 'contact',
'primary' => 'id_contact',
'multilang' => true,
'fields' => array(
'email' => array('type' => 'FILL_ME', 'validate' => 'isEmail', 'size' => 128),
'customer_service' => array('type' => 'FILL_ME', 'validate' => 'isBool'),
'name' => array('type' => 'FILL_ME', 'lang' => true, 'validate' => 'isGenericName', 'required' => true, 'size' => 32),
'description' => array('type' => 'FILL_ME', 'lang' => true, 'validate' => 'isCleanHtml'),
),
);
public function getFields()
{
$this->validateFields();