[*] 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 fddae46d56
commit 48baf36558
92 changed files with 1495 additions and 854 deletions
+16 -9
View File
@@ -36,21 +36,28 @@ class TaxRuleCore extends ObjectModel
public $behavior;
public $description;
protected $fieldsRequired = array('id_tax_rules_group', 'id_country', 'id_tax');
protected $fieldsValidate = array('id_tax_rules_group' => 'isUnsignedId',
'id_country' => 'isUnsignedId',
'id_state' => 'isUnsignedId',
'zipcode_from' => 'isPostCode',
'zipcode_to' => 'isPostCode',
'id_tax' => 'isUnsignedId',
'behavior' => 'isUnsignedInt',
'description' => 'isString');
/**
* @see ObjectModel::$definition
*/
public static $definition = array(
'table' => 'tax_rule',
'primary' => 'id_tax_rule',
'fields' => array(
'id_tax_rules_group' => array('type' => 'FILL_ME', 'validate' => 'isUnsignedId', 'required' => true),
'id_country' => array('type' => 'FILL_ME', 'validate' => 'isUnsignedId', 'required' => true),
'id_state' => array('type' => 'FILL_ME', 'validate' => 'isUnsignedId'),
'zipcode_from' => array('type' => 'FILL_ME', 'validate' => 'isPostCode'),
'zipcode_to' => array('type' => 'FILL_ME', 'validate' => 'isPostCode'),
'id_tax' => array('type' => 'FILL_ME', 'validate' => 'isUnsignedId', 'required' => true),
'behavior' => array('type' => 'FILL_ME', 'validate' => 'isUnsignedInt'),
'description' => array('type' => 'FILL_ME', 'validate' => 'isString'),
),
);
public function getFields()
{
$this->validateFields();