[*] 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
+20 -7
View File
@@ -70,20 +70,33 @@ class CMSCategoryCore extends ObjectModel
protected static $_links = array();
protected $fieldsRequired = array('id_parent', 'active');
protected $fieldsSize = array('id_parent' => 10, 'active' => 1);
protected $fieldsValidate = array('active' => 'isBool', 'id_parent' => 'isUnsignedInt');
protected $fieldsRequiredLang = array('name', 'link_rewrite');
protected $fieldsSizeLang = array('name' => 64, 'link_rewrite' => 64, 'meta_title' => 128, 'meta_description' => 255, 'meta_keywords' => 255);
protected $fieldsValidateLang = array('name' => 'isCatalogName', 'link_rewrite' => 'isLinkRewrite', 'description' => 'isCleanHtml',
'meta_title' => 'isGenericName', 'meta_description' => 'isGenericName', 'meta_keywords' => 'isGenericName');
/**
* @see ObjectModel::$definition
*/
public static $definition = array(
'table' => 'cms_category',
'primary' => 'id_cms_category',
'multilang' => true,
'fields' => array(
'active' => array('type' => 'FILL_ME', 'validate' => 'isBool', 'required' => true, 'size' => 1),
'id_parent' => array('type' => 'FILL_ME', 'validate' => 'isUnsignedInt', 'required' => true, 'size' => 10),
'name' => array('type' => 'FILL_ME', 'lang' => true, 'validate' => 'isCatalogName', 'required' => true, 'size' => 64),
'link_rewrite' => array('type' => 'FILL_ME', 'lang' => true, 'validate' => 'isLinkRewrite', 'required' => true, 'size' => 64),
'description' => array('type' => 'FILL_ME', 'lang' => true, 'validate' => 'isCleanHtml'),
'meta_title' => array('type' => 'FILL_ME', 'lang' => true, 'validate' => 'isGenericName', 'size' => 128),
'meta_description' => array('type' => 'FILL_ME', 'lang' => true, 'validate' => 'isGenericName', 'size' => 255),
'meta_keywords' => array('type' => 'FILL_ME', 'lang' => true, 'validate' => 'isGenericName', 'size' => 255),
),
);
public function __construct($id_cms_category = NULL, $id_lang = NULL)
{
parent::__construct($id_cms_category, $id_lang);