// 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
+5 -21
View File
@@ -36,12 +36,6 @@ class AttributeGroupCore extends ObjectModel
/** @var string Public Name */
public $public_name;
/**
* @see ObjectModel::$definition
*/
@@ -50,10 +44,11 @@ class AttributeGroupCore extends ObjectModel
'primary' => 'id_attribute_group',
'multilang' => true,
'fields' => array(
'is_color_group' => array('type' => 'FILL_ME', 'validate' => 'isBool'),
'name' => array('type' => 'FILL_ME', 'lang' => true, 'validate' => 'isGenericName', 'required' => true, 'size' => 64),
'public_name' => array('type' => 'FILL_ME', 'lang' => true, 'validate' => 'isGenericName', 'required' => true, 'size' => 64),
'position' => array('type' => 'FILL_ME', 'lang' => true, 'validate' => 'isInt'),
'is_color_group' => array('type' => self::TYPE_BOOL, 'validate' => 'isBool'),
'group_type' => array('type' => self::TYPE_STRING),
'position' => array('type' => self::TYPE_INT, 'validate' => 'isInt'),
'name' => array('type' => 'FILL_ME', 'lang' => true, 'validate' => 'isGenericName', 'required' => true, 'size' => 64),
'public_name' => array('type' => 'FILL_ME', 'lang' => true, 'validate' => 'isGenericName', 'required' => true, 'size' => 64),
),
);
@@ -72,17 +67,6 @@ class AttributeGroupCore extends ObjectModel
),
);
public function getFields()
{
$this->validateFields();
$fields['is_color_group'] = (int)$this->is_color_group;
$fields['group_type'] = pSQL($this->group_type);
$fields['position'] = (int)$this->position;
return $fields;
}
public function add($autodate = true, $nullValues = false)
{
if ($this->position <= 0)