[*] 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:
@@ -39,26 +39,31 @@ class OrderPaymentCore extends ObjectModel
|
||||
public $card_holder;
|
||||
public $date_add;
|
||||
|
||||
protected $fieldsRequired = array('id_order', 'id_currency', 'amount');
|
||||
protected $fieldsSize = array('transaction_id' => 254, 'card_number' => 254, 'card_brand' => 254, 'card_expiration' => 254, 'card_holder' => 254);
|
||||
protected $fieldsValidate = array(
|
||||
'id_order' => 'isUnsignedId',
|
||||
'id_currency' => 'isUnsignedId',
|
||||
'amount' => 'isPrice',
|
||||
'payment_method' => 'isName',
|
||||
'conversion_rate' => 'isFloat',
|
||||
'transaction_id' => 'isAnything',
|
||||
'card_number' => 'isAnything',
|
||||
'card_brand' => 'isAnything',
|
||||
'card_expiration' => 'isAnything',
|
||||
'card_holder' => 'isAnything'
|
||||
);
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* @see ObjectModel::$definition
|
||||
*/
|
||||
public static $definition = array(
|
||||
'table' => 'order_payment',
|
||||
'primary' => 'id_order_payment',
|
||||
'fields' => array(
|
||||
'id_order' => array('type' => 'FILL_ME', 'validate' => 'isUnsignedId', 'required' => true),
|
||||
'id_currency' => array('type' => 'FILL_ME', 'validate' => 'isUnsignedId', 'required' => true),
|
||||
'amount' => array('type' => 'FILL_ME', 'validate' => 'isPrice', 'required' => true),
|
||||
'payment_method' => array('type' => 'FILL_ME', 'validate' => 'isName'),
|
||||
'conversion_rate' => array('type' => 'FILL_ME', 'validate' => 'isFloat'),
|
||||
'transaction_id' => array('type' => 'FILL_ME', 'validate' => 'isAnything', 'size' => 254),
|
||||
'card_number' => array('type' => 'FILL_ME', 'validate' => 'isAnything', 'size' => 254),
|
||||
'card_brand' => array('type' => 'FILL_ME', 'validate' => 'isAnything', 'size' => 254),
|
||||
'card_expiration' => array('type' => 'FILL_ME', 'validate' => 'isAnything', 'size' => 254),
|
||||
'card_holder' => array('type' => 'FILL_ME', 'validate' => 'isAnything', 'size' => 254),
|
||||
),
|
||||
);
|
||||
|
||||
|
||||
public function getFields()
|
||||
{
|
||||
$this->validateFields();
|
||||
|
||||
Reference in New Issue
Block a user