[*] 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:
rMalie
2011-12-12 18:10:38 +00:00
parent c97bac9160
commit fddf4fb89b
92 changed files with 1495 additions and 854 deletions
+15 -5
View File
@@ -59,18 +59,28 @@ class ImageCore extends ObjectModel
/** @var int access rights of created folders (octal) */
protected static $access_rights = 0775;
protected $fieldsRequired = array('id_product');
protected $fieldsValidate = array('id_product' => 'isUnsignedId', 'position' => 'isUnsignedInt', 'cover' => 'isBool');
protected $fieldsRequiredLang = array('legend');
protected $fieldsSizeLang = array('legend' => 128);
protected $fieldsValidateLang = array('legend' => 'isGenericName');
/**
* @see ObjectModel::$definition
*/
public static $definition = array(
'table' => 'image',
'primary' => 'id_image',
'multilang' => true,
'fields' => array(
'id_product' => array('type' => 'FILL_ME', 'validate' => 'isUnsignedId', 'required' => true),
'position' => array('type' => 'FILL_ME', 'validate' => 'isUnsignedInt'),
'cover' => array('type' => 'FILL_ME', 'validate' => 'isBool'),
'legend' => array('type' => 'FILL_ME', 'lang' => true, 'validate' => 'isGenericName', 'required' => true, 'size' => 128),
),
);
protected static $_cacheGetSize = array();
public function __construct($id = null, $id_lang = null)