// Format definitions

This commit is contained in:
rMalie
2011-12-13 13:41:54 +00:00
parent a40f3c304c
commit c022f4e0e5
71 changed files with 710 additions and 1791 deletions
+6 -20
View File
@@ -44,10 +44,6 @@ class ConfigurationCore extends ObjectModel
/** @var string Object last modification date */
public $date_upd;
/**
* @see ObjectModel::$definition
*/
@@ -56,13 +52,15 @@ class ConfigurationCore extends ObjectModel
'primary' => 'id_configuration',
'multilang' => true,
'fields' => array(
'name' => array('type' => 'FILL_ME', 'validate' => 'isConfigName', 'required' => true, 'size' => 32),
'id_group_shop' => array('type' => 'FILL_ME', 'validate' => 'isUnsignedId'),
'id_shop' => array('type' => 'FILL_ME', 'validate' => 'isUnsignedId'),
'name' => array('type' => self::TYPE_STRING, 'validate' => 'isConfigName', 'required' => true, 'size' => 32),
'id_group_shop' => array('type' => self::TYPE_INT, 'validate' => 'isUnsignedId'),
'id_shop' => array('type' => self::TYPE_INT, 'validate' => 'isUnsignedId'),
'value' => array('type' => self::TYPE_STRING),
'date_add' => array('type' => self::TYPE_DATE, 'validate' => 'isDate'),
'date_upd' => array('type' => self::TYPE_DATE, 'validate' => 'isDate'),
),
);
/** @var array Configuration cache */
protected static $_CONF;
@@ -75,18 +73,6 @@ class ConfigurationCore extends ObjectModel
)
);
public function getFields()
{
$this->validateFields();
$fields['name'] = pSQL($this->name);
$fields['id_group_shop'] = $this->id_group_shop;
$fields['id_shop'] = $this->id_shop;
$fields['value'] = pSQL($this->value);
$fields['date_add'] = pSQL($this->date_add);
$fields['date_upd'] = pSQL($this->date_upd);
return $fields;
}
/**
* Check then return multilingual fields for database interaction
*