[*] 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:
@@ -49,20 +49,25 @@ class WarehouseProductLocationCore extends ObjectModel
|
||||
* */
|
||||
public $location;
|
||||
|
||||
protected $fieldsRequired = array('id_product', 'id_product_attribute', 'id_warehouse');
|
||||
protected $fieldsSize = array('location' => 64);
|
||||
protected $fieldsValidate = array(
|
||||
'location' => 'isReference',
|
||||
'id_product' => 'isUnsignedId',
|
||||
'id_product_attribute' => 'isUnsignedId',
|
||||
'id_warehouse' => 'isUnsignedId',
|
||||
);
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* @see ObjectModel::$definition
|
||||
*/
|
||||
public static $definition = array(
|
||||
'table' => 'warehouse_product_location',
|
||||
'primary' => 'id_warehouse_product_location',
|
||||
'fields' => array(
|
||||
'location' => array('type' => 'FILL_ME', 'validate' => 'isReference', 'size' => 64),
|
||||
'id_product' => array('type' => 'FILL_ME', 'validate' => 'isUnsignedId', 'required' => true),
|
||||
'id_product_attribute' => array('type' => 'FILL_ME', 'validate' => 'isUnsignedId', 'required' => true),
|
||||
'id_warehouse' => array('type' => 'FILL_ME', 'validate' => 'isUnsignedId', 'required' => true),
|
||||
),
|
||||
);
|
||||
|
||||
|
||||
public function getFields()
|
||||
{
|
||||
$this->validateFields();
|
||||
|
||||
Reference in New Issue
Block a user