// Format definitions

git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@11157 b9a71923-0436-4b27-9f14-aed3839534dd
This commit is contained in:
rMalie
2011-12-12 21:06:59 +00:00
parent 5a2d80bd50
commit b8f5b693b9
13 changed files with 171 additions and 413 deletions
+4 -21
View File
@@ -36,12 +36,6 @@ class AttributeCore extends ObjectModel
public $position;
public $default;
/**
* @see ObjectModel::$definition
*/
@@ -50,10 +44,10 @@ class AttributeCore extends ObjectModel
'primary' => 'id_attribute',
'multilang' => true,
'fields' => array(
'id_attribute_group' => array('type' => 'FILL_ME', 'validate' => 'isUnsignedId', 'required' => true),
'color' => array('type' => 'FILL_ME', 'validate' => 'isColor'),
'position' => array('type' => 'FILL_ME', 'validate' => 'isInt'),
'name' => array('type' => 'FILL_ME', 'lang' => true, 'validate' => 'isGenericName', 'required' => true, 'size' => 64),
'id_attribute_group' => array('type' => self::TYPE_INT, 'validate' => 'isUnsignedId', 'required' => true),
'color' => array('type' => self::TYPE_STRING, 'validate' => 'isColor'),
'position' => array('type' => self::TYPE_INT, 'validate' => 'isInt'),
'name' => array('type' => 'FILL_ME', 'lang' => true, 'validate' => 'isGenericName', 'required' => true, 'size' => 64),
),
);
@@ -75,17 +69,6 @@ class AttributeCore extends ObjectModel
parent::__construct($id, $id_lang, $id_shop);
}
public function getFields()
{
$this->validateFields();
$fields['id_attribute_group'] = (int)$this->id_attribute_group;
$fields['color'] = pSQL($this->color);
$fields['position'] = (int)$this->position;
return $fields;
}
/**
* Check then return multilingual fields for database interaction
*