// 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
@@ -40,13 +40,6 @@ class ContactCore extends ObjectModel
public $customer_service;
/**
* @see ObjectModel::$definition
*/
@@ -55,22 +48,15 @@ class ContactCore extends ObjectModel
'primary' => 'id_contact',
'multilang' => true,
'fields' => array(
'email' => array('type' => 'FILL_ME', 'validate' => 'isEmail', 'size' => 128),
'customer_service' => array('type' => 'FILL_ME', 'validate' => 'isBool'),
'name' => array('type' => 'FILL_ME', 'lang' => true, 'validate' => 'isGenericName', 'required' => true, 'size' => 32),
'description' => array('type' => 'FILL_ME', 'lang' => true, 'validate' => 'isCleanHtml'),
'email' => array('type' => self::TYPE_STRING, 'validate' => 'isEmail', 'size' => 128),
'customer_service' => array('type' => self::TYPE_BOOL, 'validate' => 'isBool'),
// Lang fields
'name' => array('type' => 'FILL_ME', 'lang' => true, 'validate' => 'isGenericName', 'required' => true, 'size' => 32),
'description' => array('type' => 'FILL_ME', 'lang' => true, 'validate' => 'isCleanHtml'),
),
);
public function getFields()
{
$this->validateFields();
$fields['email'] = pSQL($this->email);
$fields['customer_service'] = (int)$this->customer_service;
return $fields;
}
/**
* Check then return multilingual fields for database interaction
*