// Format definitions

This commit is contained in:
rMalie
2011-12-12 21:06:59 +00:00
parent 568fca377c
commit 39b9c7cfa1
13 changed files with 171 additions and 413 deletions
+2 -16
View File
@@ -38,10 +38,6 @@ class AddressFormatCore extends ObjectModel
private $_errorFormatList = array();
/* MySQL does not allow 'order detail' for a table name */
/**
* @see ObjectModel::$definition
*/
@@ -49,11 +45,11 @@ class AddressFormatCore extends ObjectModel
'table' => 'address_format',
'primary' => 'id_country',
'fields' => array(
'format' => array('type' => 'FILL_ME', 'validate' => 'isGenericName', 'required' => true),
'format' => array('type' => self::TYPE_STRING, 'validate' => 'isGenericName', 'required' => true),
'id_country' => array('type' => self::TYPE_INT),
),
);
public static $requireFormFieldsList = array(
'firstname',
'name',
@@ -100,16 +96,6 @@ class AddressFormatCore extends ObjectModel
const _CLEANING_REGEX_ = '#([^\w:_]+)#i';
public function getFields()
{
$this->validateFields();
$fields['id_country'] = (int)($this->id_country);
$fields['format'] = pSQL($this->format);
return $fields;
}
/*
* Check if the the association of the field name and a class name
* is valide