[*] Classes: Remove $fieldsRequired, $fieldsSize and $fieldsValidate (and lang properties) properties, use $definition instead
This commit is contained in:
+16
-9
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user