// Remove $table and $identifier property from all classes, and add static $definition instead
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@10912 b9a71923-0436-4b27-9f14-aed3839534dd
This commit is contained in:
+5
-2
@@ -107,8 +107,11 @@ class AddressCore extends ObjectModel
|
||||
'city' => 'isCityName', 'other' => 'isMessage',
|
||||
'phone' => 'isPhoneNumber', 'phone_mobile' => 'isPhoneNumber', 'deleted' => 'isBool', 'dni' => 'isDniLite');
|
||||
|
||||
protected $table = 'address';
|
||||
protected $identifier = 'id_address';
|
||||
public static $definition = array(
|
||||
'table' => 'address',
|
||||
'primary' => 'id_address',
|
||||
);
|
||||
|
||||
protected $_includeVars = array('addressType' => 'table');
|
||||
protected $_includeContainer = false;
|
||||
|
||||
|
||||
@@ -42,8 +42,10 @@ class AddressFormatCore extends ObjectModel
|
||||
protected $fieldsValidate = array ('format' => 'isGenericName');
|
||||
|
||||
/* MySQL does not allow 'order detail' for a table name */
|
||||
protected $table = 'address_format';
|
||||
protected $identifier = 'id_country';
|
||||
public static $definition = array(
|
||||
'table' => 'address_format',
|
||||
'primary' => 'id_country',
|
||||
);
|
||||
|
||||
public static $requireFormFieldsList = array(
|
||||
'firstname',
|
||||
|
||||
+4
-2
@@ -35,8 +35,10 @@ class AliasCore extends ObjectModel
|
||||
protected $fieldsSize = array('alias' => 255, 'search' => 255);
|
||||
protected $fieldsValidate = array('search' => 'isValidSearch', 'alias' => 'isValidSearch', 'active' => 'isBool');
|
||||
|
||||
protected $table = 'alias';
|
||||
protected $identifier = 'id_alias';
|
||||
public static $definition = array(
|
||||
'table' => 'alias',
|
||||
'primary' => 'id_alias',
|
||||
);
|
||||
|
||||
function __construct($id = NULL, $alias = NULL, $search = NULL, $id_lang = NULL)
|
||||
{
|
||||
|
||||
@@ -44,8 +44,11 @@ class AttachmentCore extends ObjectModel
|
||||
protected $fieldsSizeLang = array('name' => 32);
|
||||
protected $fieldsValidateLang = array('name' => 'isGenericName', 'description' => 'isCleanHtml');
|
||||
|
||||
protected $table = 'attachment';
|
||||
protected $identifier = 'id_attachment';
|
||||
public static $definition = array(
|
||||
'table' => 'attachment',
|
||||
'primary' => 'id_attachment',
|
||||
'multilang' => true,
|
||||
);
|
||||
|
||||
public function getFields()
|
||||
{
|
||||
|
||||
@@ -42,8 +42,12 @@ class AttributeCore extends ObjectModel
|
||||
protected $fieldsSizeLang = array('name' => 64);
|
||||
protected $fieldsValidateLang = array('name' => 'isGenericName');
|
||||
|
||||
protected $table = 'attribute';
|
||||
protected $identifier = 'id_attribute';
|
||||
public static $definition = array(
|
||||
'table' => 'attribute',
|
||||
'primary' => 'id_attribute',
|
||||
'multilang' => true,
|
||||
);
|
||||
|
||||
protected $image_dir = _PS_COL_IMG_DIR_;
|
||||
|
||||
protected $webserviceParameters = array(
|
||||
|
||||
@@ -42,8 +42,11 @@ class AttributeGroupCore extends ObjectModel
|
||||
protected $fieldsSizeLang = array('name' => 64, 'public_name' => 64);
|
||||
protected $fieldsValidateLang = array('name' => 'isGenericName', 'public_name' => 'isGenericName', 'position' => 'isInt');
|
||||
|
||||
protected $table = 'attribute_group';
|
||||
protected $identifier = 'id_attribute_group';
|
||||
public static $definition = array(
|
||||
'table' => 'attribute_group',
|
||||
'primary' => 'id_attribute_group',
|
||||
'multilang' => true,
|
||||
);
|
||||
|
||||
protected $webserviceParameters = array(
|
||||
'objectsNodeName' => 'product_options',
|
||||
|
||||
+5
-2
@@ -42,8 +42,11 @@ class CMSCore extends ObjectModel
|
||||
protected $fieldsSizeLang = array('meta_description' => 255, 'meta_keywords' => 255, 'meta_title' => 128, 'link_rewrite' => 128, 'content' => 3999999999999);
|
||||
protected $fieldsValidateLang = array('meta_description' => 'isGenericName', 'meta_keywords' => 'isGenericName', 'meta_title' => 'isGenericName', 'link_rewrite' => 'isLinkRewrite', 'content' => 'isString');
|
||||
|
||||
protected $table = 'cms';
|
||||
protected $identifier = 'id_cms';
|
||||
public static $definition = array(
|
||||
'table' => 'cms',
|
||||
'primary' => 'id_cms',
|
||||
'multilang' => true,
|
||||
);
|
||||
|
||||
protected $webserviceParameters = array(
|
||||
'objectNodeName' => 'content',
|
||||
|
||||
@@ -81,8 +81,11 @@ class CMSCategoryCore extends ObjectModel
|
||||
protected $fieldsValidateLang = array('name' => 'isCatalogName', 'link_rewrite' => 'isLinkRewrite', 'description' => 'isCleanHtml',
|
||||
'meta_title' => 'isGenericName', 'meta_description' => 'isGenericName', 'meta_keywords' => 'isGenericName');
|
||||
|
||||
protected $table = 'cms_category';
|
||||
protected $identifier = 'id_cms_category';
|
||||
public static $definition = array(
|
||||
'table' => 'cms_category',
|
||||
'primary' => 'id_cms_category',
|
||||
'multilang' => true,
|
||||
);
|
||||
|
||||
public function __construct($id_cms_category = NULL, $id_lang = NULL)
|
||||
{
|
||||
|
||||
+5
-2
@@ -122,8 +122,11 @@ class CarrierCore extends ObjectModel
|
||||
protected $fieldsSizeLang = array('delay' => 128);
|
||||
protected $fieldsValidateLang = array('delay' => 'isGenericName');
|
||||
|
||||
protected $table = 'carrier';
|
||||
protected $identifier = 'id_carrier';
|
||||
public static $definition = array(
|
||||
'table' => 'carrier',
|
||||
'primary' => 'id_carrier',
|
||||
'multilang' => true,
|
||||
);
|
||||
|
||||
protected static $price_by_weight = array();
|
||||
protected static $price_by_weight2 = array();
|
||||
|
||||
+5
-2
@@ -105,8 +105,11 @@ class CartCore extends ObjectModel
|
||||
protected static $_carriers = null;
|
||||
protected static $_taxes_rate = null;
|
||||
protected static $_attributesLists = array();
|
||||
protected $table = 'cart';
|
||||
protected $identifier = 'id_cart';
|
||||
|
||||
public static $definition = array(
|
||||
'table' => 'cart',
|
||||
'primary' => 'id_cart',
|
||||
);
|
||||
|
||||
protected $webserviceParameters = array(
|
||||
'fields' => array(
|
||||
|
||||
@@ -59,7 +59,8 @@ class CartRuleCore extends ObjectModel
|
||||
|
||||
public static $definition = array(
|
||||
'table' => 'cart_rule',
|
||||
'primary' => 'id_cart_rule',
|
||||
'identifier' => 'id_cart_rule',
|
||||
'multilang' => true,
|
||||
);
|
||||
|
||||
protected $fieldsRequired = array('date_from', 'date_to');
|
||||
|
||||
+16
-11
@@ -103,8 +103,11 @@ class CategoryCore extends ObjectModel
|
||||
'meta_keywords' => 'isGenericName'
|
||||
);
|
||||
|
||||
protected $table = 'category';
|
||||
protected $identifier = 'id_category';
|
||||
public static $definition = array(
|
||||
'table' => 'category',
|
||||
'primary' => 'id_category',
|
||||
'multilang' => true,
|
||||
);
|
||||
|
||||
/** @var string id_image is the category ID when an image exists and 'default' otherwise */
|
||||
public $id_image = 'default';
|
||||
@@ -703,18 +706,20 @@ class CategoryCore extends ObjectModel
|
||||
ORDER BY `position` ASC');
|
||||
}
|
||||
|
||||
/** return an array of all children of the current category
|
||||
/**
|
||||
* Return an array of all children of the current category
|
||||
*
|
||||
* @return array rows of table category
|
||||
* @todo return hydrateCollection
|
||||
* @param int $id_lang
|
||||
* @return Collection
|
||||
*/
|
||||
public function getAllChildren()
|
||||
public function getAllChildren($id_lang = null)
|
||||
{
|
||||
return Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS('
|
||||
SELECT *
|
||||
FROM `'._DB_PREFIX_.'category`
|
||||
WHERE '.(int)$this->nleft.' < nleft AND nright < '.(int)$this->nright
|
||||
);
|
||||
if (is_null($id_lang))
|
||||
$id_lang = Context::getContext()->language->id;
|
||||
|
||||
$categories = new Collection('Category', $id_lang);
|
||||
$categories->where((int)$this->nleft.' < nleft AND nright < '.(int)$this->nright);
|
||||
return $categories;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -78,7 +78,9 @@ class CollectionCore implements Iterator, Countable
|
||||
|
||||
$this->definition = ObjectModel::getDefinition($this->classname);
|
||||
if (!isset($this->definition['table']))
|
||||
throw new PrestashopException('Miss table in definition');
|
||||
throw new PrestashopException('Miss table in definition for class '.$this->classname);
|
||||
else if (!isset($this->definition['primary']))
|
||||
throw new PrestashopException('Miss primary in definition for class '.$this->classname);
|
||||
|
||||
$this->query = new DbQuery();
|
||||
$this->query->select('a.*');
|
||||
|
||||
@@ -81,8 +81,10 @@ class CombinationCore extends ObjectModel
|
||||
'available_date' => 'isDateFormat',
|
||||
);
|
||||
|
||||
protected $table = 'product_attribute';
|
||||
protected $identifier = 'id_product_attribute';
|
||||
public static $definition = array(
|
||||
'table' => 'product_attribute',
|
||||
'primary' => 'id_product_attribute',
|
||||
);
|
||||
|
||||
protected $webserviceParameters = array(
|
||||
'objectNodeName' => 'combination',
|
||||
|
||||
@@ -44,10 +44,10 @@ class CompareProductCore extends ObjectModel
|
||||
'id_customer' => 'isUnsignedInt'
|
||||
);
|
||||
|
||||
protected $table = 'compare';
|
||||
|
||||
protected $identifier = 'id_compare';
|
||||
|
||||
public static $definition = array(
|
||||
'table' => 'compare',
|
||||
'primary' => 'id_compare',
|
||||
);
|
||||
|
||||
/**
|
||||
* Get all comapare products of the customer
|
||||
|
||||
@@ -48,8 +48,11 @@ class ConfigurationCore extends ObjectModel
|
||||
protected $fieldsSize = array('name' => 32);
|
||||
protected $fieldsValidate = array('name' => 'isConfigName', 'id_group_shop' => 'isUnsignedId', 'id_shop' => 'isUnsignedId');
|
||||
|
||||
protected $table = 'configuration';
|
||||
protected $identifier = 'id_configuration';
|
||||
public static $definition = array(
|
||||
'table' => 'configuration',
|
||||
'primary' => 'id_configuration',
|
||||
'multilang' => true,
|
||||
);
|
||||
|
||||
/** @var array Configuration cache */
|
||||
protected static $_CONF;
|
||||
|
||||
@@ -53,8 +53,10 @@ class ConnectionCore extends ObjectModel
|
||||
'ip_address' => 'isInt', 'http_referer' => 'isAbsoluteUrl');
|
||||
|
||||
/* MySQL does not allow 'connection' for a table name */
|
||||
protected $table = 'connections';
|
||||
protected $identifier = 'id_connections';
|
||||
public static $definition = array(
|
||||
'table' => 'connections',
|
||||
'primary' => 'id_connections',
|
||||
);
|
||||
|
||||
public function getFields()
|
||||
{
|
||||
|
||||
@@ -38,8 +38,10 @@ class ConnectionsSourceCore extends ObjectModel
|
||||
protected $fieldsRequired = array('id_connections', 'date_add');
|
||||
protected $fieldsValidate = array('id_connections' => 'isUnsignedId', 'http_referer' => 'isAbsoluteUrl', 'request_uri' => 'isUrl', 'keywords' => 'isMessage');
|
||||
|
||||
protected $table = 'connections_source';
|
||||
protected $identifier = 'id_connections_source';
|
||||
public static $definition = array(
|
||||
'table' => 'connections_source',
|
||||
'primary' => 'id_connections_source',
|
||||
);
|
||||
|
||||
public function getFields()
|
||||
{
|
||||
|
||||
+5
-2
@@ -47,8 +47,11 @@ class ContactCore extends ObjectModel
|
||||
protected $fieldsSizeLang = array('name' => 32);
|
||||
protected $fieldsValidateLang = array('name' => 'isGenericName', 'description' => 'isCleanHtml');
|
||||
|
||||
protected $table = 'contact';
|
||||
protected $identifier = 'id_contact';
|
||||
public static $definition = array(
|
||||
'table' => 'contact',
|
||||
'primary' => 'id_contact',
|
||||
'multilang' => true,
|
||||
);
|
||||
|
||||
public function getFields()
|
||||
{
|
||||
|
||||
+5
-2
@@ -93,8 +93,11 @@ class CountryCore extends ObjectModel
|
||||
),
|
||||
);
|
||||
|
||||
protected $table = 'country';
|
||||
protected $identifier = 'id_country';
|
||||
public static $definition = array(
|
||||
'table' => 'country',
|
||||
'primary' => 'id_country',
|
||||
'multilang' => true,
|
||||
);
|
||||
|
||||
public function getFields()
|
||||
{
|
||||
|
||||
+4
-2
@@ -40,8 +40,10 @@ class CountyCore extends ObjectModel
|
||||
protected $fieldsSize = array('name' => 64);
|
||||
protected $fieldsValidate = array('name' => 'isGenericName', 'id_state' => 'isUnsignedId', 'active' => 'isBool');
|
||||
|
||||
protected $table = 'county';
|
||||
protected $identifier = 'id_county';
|
||||
public static $definition = array(
|
||||
'table' => 'county',
|
||||
'primary' => 'id_county',
|
||||
);
|
||||
|
||||
private static $_cache_get_counties = array();
|
||||
private static $_cache_county_zipcode = array();
|
||||
|
||||
@@ -64,8 +64,11 @@ class CurrencyCore extends ObjectModel
|
||||
protected $fieldsValidate = array('name' => 'isGenericName', 'iso_code' => 'isLanguageIsoCode', 'iso_code_num' => 'isNumericIsoCode', 'blank' => 'isInt', 'sign' => 'isGenericName',
|
||||
'format' => 'isUnsignedId', 'decimals' => 'isBool', 'conversion_rate' => 'isFloat', 'deleted' => 'isBool', 'active' => 'isBool');
|
||||
|
||||
protected $table = 'currency';
|
||||
protected $identifier = 'id_currency';
|
||||
public static $definition = array(
|
||||
'table' => 'currency',
|
||||
'primary' => 'id_currency',
|
||||
'multilang' => true,
|
||||
);
|
||||
|
||||
/** @var array Currency cache */
|
||||
static protected $currencies = array();
|
||||
|
||||
@@ -142,8 +142,10 @@ class CustomerCore extends ObjectModel
|
||||
),
|
||||
);
|
||||
|
||||
protected $table = 'customer';
|
||||
protected $identifier = 'id_customer';
|
||||
public static $definition = array(
|
||||
'table' => 'customer',
|
||||
'primary' => 'id_customer',
|
||||
);
|
||||
|
||||
protected static $_defaultGroupId = array();
|
||||
protected static $_customerHasAddress = array();
|
||||
|
||||
@@ -37,8 +37,10 @@ class CustomerMessageCore extends ObjectModel
|
||||
public $private;
|
||||
public $date_add;
|
||||
|
||||
protected $table = 'customer_message';
|
||||
protected $identifier = 'id_customer_message';
|
||||
public static $definition = array(
|
||||
'table' => 'customer_message',
|
||||
'primary' => 'id_customer_message',
|
||||
);
|
||||
|
||||
protected $fieldsRequired = array('message');
|
||||
protected $fieldsSize = array('message' => 65000);
|
||||
|
||||
@@ -40,8 +40,10 @@ class CustomerThreadCore extends ObjectModel
|
||||
public $date_add;
|
||||
public $date_upd;
|
||||
|
||||
protected $table = 'customer_thread';
|
||||
protected $identifier = 'id_customer_thread';
|
||||
public static $definition = array(
|
||||
'table' => 'customer_thread',
|
||||
'primary' => 'id_customer_thread',
|
||||
);
|
||||
|
||||
protected $fieldsRequired = array('id_lang', 'id_contact', 'token');
|
||||
protected $fieldsSize = array('email' => 254);
|
||||
|
||||
@@ -33,8 +33,10 @@ class DateRangeCore extends ObjectModel
|
||||
protected $fieldsRequired = array ('time_start', 'time_end');
|
||||
protected $fieldsValidate = array ('time_start' => 'isDate', 'time_end' => 'isDate');
|
||||
|
||||
protected $table = 'date_range';
|
||||
protected $identifier = 'id_date_range';
|
||||
public static $definition = array(
|
||||
'table' => 'date_range',
|
||||
'primary' => 'id_date_range',
|
||||
);
|
||||
|
||||
public function getFields()
|
||||
{
|
||||
|
||||
@@ -67,8 +67,10 @@ class DeliveryCore extends ObjectModel
|
||||
'price' => 'isPrice'
|
||||
);
|
||||
|
||||
protected $table = 'delivery';
|
||||
protected $identifier = 'id_delivery';
|
||||
public static $definition = array(
|
||||
'table' => 'delivery',
|
||||
'primary' => 'id_delivery',
|
||||
);
|
||||
|
||||
protected $webserviceParameters = array(
|
||||
'objectsNodeName' => 'deliveries',
|
||||
|
||||
@@ -73,8 +73,10 @@ class EmployeeCore extends ObjectModel
|
||||
'passwd' => 'isPasswdAdmin', 'active' => 'isBool', 'id_profile' => 'isInt', 'bo_color' => 'isColor', 'bo_theme' => 'isGenericName',
|
||||
'bo_show_screencast' => 'isBool');
|
||||
|
||||
protected $table = 'employee';
|
||||
protected $identifier = 'id_employee';
|
||||
public static $definition = array(
|
||||
'table' => 'employee',
|
||||
'primary' => 'id_employee',
|
||||
);
|
||||
|
||||
protected $webserviceParameters = array(
|
||||
'fields' => array(
|
||||
|
||||
+4
-2
@@ -38,8 +38,10 @@ class FeatureCore extends ObjectModel
|
||||
'position' => 'isInt'
|
||||
);
|
||||
|
||||
protected $table = 'feature';
|
||||
protected $identifier = 'id_feature';
|
||||
public static $definition = array(
|
||||
'table' => 'feature',
|
||||
'primary' => 'id_feature',
|
||||
);
|
||||
|
||||
protected $webserviceParameters = array(
|
||||
'objectsNodeName' => 'product_features',
|
||||
|
||||
@@ -46,8 +46,11 @@ class FeatureValueCore extends ObjectModel
|
||||
protected $fieldsSizeLang = array('value' => 255);
|
||||
protected $fieldsValidateLang = array('value' => 'isGenericName');
|
||||
|
||||
protected $table = 'feature_value';
|
||||
protected $identifier = 'id_feature_value';
|
||||
public static $definition = array(
|
||||
'table' => 'feature_value',
|
||||
'primary' => 'id_feature_value',
|
||||
'multilang' => true,
|
||||
);
|
||||
|
||||
protected $webserviceParameters = array(
|
||||
'objectsNodeName' => 'product_feature_values',
|
||||
|
||||
+5
-2
@@ -54,8 +54,11 @@ class GroupCore extends ObjectModel
|
||||
protected $fieldsSizeLang = array('name' => 32);
|
||||
protected $fieldsValidateLang = array('name' => 'isGenericName');
|
||||
|
||||
protected $table = 'group';
|
||||
protected $identifier = 'id_group';
|
||||
public static $definition = array(
|
||||
'table' => 'group',
|
||||
'primary' => 'id_group',
|
||||
'multilang' => true,
|
||||
);
|
||||
|
||||
protected static $cache_reduction = array();
|
||||
protected static $group_price_display_method = array();
|
||||
|
||||
@@ -34,8 +34,10 @@ class GroupReductionCore extends ObjectModel
|
||||
protected $fieldsRequired = array('id_group', 'id_category', 'reduction');
|
||||
protected $fieldsValidate = array('id_group' => 'isUnsignedId', 'id_category' => 'isUnsignedId', 'reduction' => 'isPrice');
|
||||
|
||||
protected $table = 'group_reduction';
|
||||
protected $identifier = 'id_group_reduction';
|
||||
public static $definition = array(
|
||||
'table' => 'group_reduction',
|
||||
'primary' => 'id_group_reduction',
|
||||
);
|
||||
|
||||
protected static $reduction_cache = array();
|
||||
|
||||
|
||||
+4
-3
@@ -60,9 +60,10 @@ class GuestCore extends ObjectModel
|
||||
'accept_language' => 'isGenericName'
|
||||
);
|
||||
|
||||
protected $table = 'guest';
|
||||
protected $identifier = 'id_guest';
|
||||
|
||||
public static $definition = array(
|
||||
'table' => 'guest',
|
||||
'primary' => 'id_guest',
|
||||
);
|
||||
|
||||
protected $webserviceParameters = array(
|
||||
'fields' => array(
|
||||
|
||||
+4
-2
@@ -35,8 +35,10 @@ class HookCore extends ObjectModel
|
||||
protected $fieldsSize = array('name' => 32);
|
||||
protected $fieldsValidate = array('name' => 'isHookName');
|
||||
|
||||
protected $table = 'hook';
|
||||
protected $identifier = 'id_hook';
|
||||
public static $definition = array(
|
||||
'table' => 'hook',
|
||||
'primary' => 'id_hook',
|
||||
);
|
||||
|
||||
protected static $_hookModulesCache;
|
||||
|
||||
|
||||
+5
-2
@@ -67,8 +67,11 @@ class ImageCore extends ObjectModel
|
||||
protected $fieldsSizeLang = array('legend' => 128);
|
||||
protected $fieldsValidateLang = array('legend' => 'isGenericName');
|
||||
|
||||
protected $table = 'image';
|
||||
protected $identifier = 'id_image';
|
||||
public static $definition = array(
|
||||
'table' => 'image',
|
||||
'primary' => 'id_image',
|
||||
'multilang' => true,
|
||||
);
|
||||
|
||||
protected static $_cacheGetSize = array();
|
||||
|
||||
|
||||
@@ -70,8 +70,10 @@ class ImageTypeCore extends ObjectModel
|
||||
);
|
||||
protected $fieldsSize = array('name' => 16);
|
||||
|
||||
protected $table = 'image_type';
|
||||
protected $identifier = 'id_image_type';
|
||||
public static $definition = array(
|
||||
'table' => 'image_type',
|
||||
'primary' => 'id_image_type',
|
||||
);
|
||||
|
||||
/**
|
||||
* @var array Image types cache
|
||||
|
||||
@@ -55,8 +55,10 @@ class LanguageCore extends ObjectModel
|
||||
protected $fieldsValidate = array('name' => 'isGenericName', 'iso_code' => 'isLanguageIsoCode', 'language_code' => 'isLanguageCode',
|
||||
'active' => 'isBool', 'is_rtl' => 'isBool', 'date_format_lite' => 'isPhpDateFormat', 'date_format_full' => 'isPhpDateFormat');
|
||||
|
||||
protected $table = 'lang';
|
||||
protected $identifier = 'id_lang';
|
||||
public static $definition = array(
|
||||
'table' => 'lang',
|
||||
'primary' => 'id_lang',
|
||||
);
|
||||
|
||||
/** @var array Languages cache */
|
||||
protected static $_checkedLangs;
|
||||
|
||||
+4
-2
@@ -56,8 +56,10 @@ class LoggerCore extends ObjectModel
|
||||
protected $fieldsValidate = array('id_log' => 'isUnsignedId', 'severity' => 'isInt', 'error_code' => 'isUnsignedInt',
|
||||
'message' => 'isMessage', 'object_id' => 'isUnsignedInt', 'object_type' => 'isName');
|
||||
|
||||
protected $table = 'log';
|
||||
protected $identifier = 'id_log';
|
||||
public static $definition = array(
|
||||
'table' => 'log',
|
||||
'primary' => 'id_log',
|
||||
);
|
||||
|
||||
protected static $is_present = array();
|
||||
|
||||
|
||||
@@ -81,8 +81,13 @@ class ManufacturerCore extends ObjectModel
|
||||
'meta_description' => 'isGenericName',
|
||||
'meta_keywords' => 'isGenericName'
|
||||
);
|
||||
protected $table = 'manufacturer';
|
||||
protected $identifier = 'id_manufacturer';
|
||||
|
||||
public static $definition = array(
|
||||
'table' => 'manufacturer',
|
||||
'primary' => 'id_manufacturer',
|
||||
'multilang' => true,
|
||||
);
|
||||
|
||||
protected $webserviceParameters = array(
|
||||
'fields' => array(
|
||||
'active' => array(),
|
||||
|
||||
+4
-2
@@ -56,8 +56,10 @@ class MessageCore extends ObjectModel
|
||||
'message' => 'isCleanHtml', 'id_cart' => 'isUnsignedId', 'id_order' => 'isUnsignedId',
|
||||
'id_customer' => 'isUnsignedId', 'id_employee' => 'isUnsignedId', 'private' => 'isBool');
|
||||
|
||||
protected $table = 'message';
|
||||
protected $identifier = 'id_message';
|
||||
public static $definition = array(
|
||||
'table' => 'message',
|
||||
'primary' => 'id_message',
|
||||
);
|
||||
|
||||
public function getFields()
|
||||
{
|
||||
|
||||
+6
-2
@@ -43,8 +43,12 @@ class MetaCore extends ObjectModel
|
||||
protected $fieldsValidateLang = array('title' => 'isGenericName', 'description' => 'isGenericName', 'keywords' => 'isGenericName', 'url_rewrite' => 'isLinkRewrite');
|
||||
|
||||
protected $langMultiShop = true;
|
||||
protected $table = 'meta';
|
||||
protected $identifier = 'id_meta';
|
||||
|
||||
public static $definition = array(
|
||||
'table' => 'meta',
|
||||
'primary' => 'id_meta',
|
||||
'multilang' => true,
|
||||
);
|
||||
|
||||
public function getFields()
|
||||
{
|
||||
|
||||
+4
-3
@@ -68,9 +68,10 @@ abstract class ModuleCore
|
||||
|
||||
protected $_errors = false;
|
||||
|
||||
protected $table = 'module';
|
||||
|
||||
protected $identifier = 'id_module';
|
||||
public static $definition = array(
|
||||
'table' => 'module',
|
||||
'primary' => 'id_module',
|
||||
);
|
||||
|
||||
public static $_db;
|
||||
|
||||
|
||||
+4
-2
@@ -35,8 +35,10 @@ class PageCore extends ObjectModel
|
||||
protected $fieldsRequired = array ('id_page_type');
|
||||
protected $fieldsValidate = array ('id_page_type' => 'isUnsignedId', 'id_object' => 'isUnsignedId');
|
||||
|
||||
protected $table = 'page';
|
||||
protected $identifier = 'id_page';
|
||||
public static $definition = array(
|
||||
'table' => 'page',
|
||||
'primary' => 'id_page',
|
||||
);
|
||||
|
||||
public function getFields()
|
||||
{
|
||||
|
||||
@@ -49,8 +49,10 @@ class PaymentCCCore extends OrderPayment
|
||||
'id_order' => 'isUnsignedId', 'id_currency' => 'isUnsignedId', 'amount' => 'isPrice',
|
||||
'transaction_id' => 'isAnything', 'card_number' => 'isAnything', 'card_brand' => 'isAnything', 'card_expiration' => 'isAnything', 'card_holder' => 'isAnything');
|
||||
|
||||
protected $table = 'payment_cc';
|
||||
protected $identifier = 'id_payment_cc';
|
||||
public static $definition = array(
|
||||
'table' => 'payment_cc',
|
||||
'primary' => 'id_payment_cc',
|
||||
);
|
||||
|
||||
/**
|
||||
* @deprecated 1.5.0.2
|
||||
|
||||
+5
-2
@@ -261,8 +261,11 @@ class ProductCore extends ObjectModel
|
||||
'meta_title' => 'isGenericName', 'link_rewrite' => 'isLinkRewrite', 'name' => 'isCatalogName',
|
||||
'description' => 'isString', 'description_short' => 'isString', 'available_now' => 'isGenericName', 'available_later' => 'IsGenericName');
|
||||
|
||||
protected $table = 'product';
|
||||
protected $identifier = 'id_product';
|
||||
public static $definition = array(
|
||||
'table' => 'product',
|
||||
'primary' => 'id_product',
|
||||
'multilang' => true,
|
||||
);
|
||||
|
||||
protected $webserviceParameters = array(
|
||||
'objectMethods' => array(
|
||||
|
||||
@@ -86,8 +86,10 @@ class ProductDownloadCore extends ObjectModel
|
||||
'is_shareable' => 'isUnsignedInt'
|
||||
);
|
||||
|
||||
protected $table = 'product_download';
|
||||
protected $identifier = 'id_product_download';
|
||||
public static $definition = array(
|
||||
'table' => 'product_download',
|
||||
'primary' => 'id_product_download',
|
||||
);
|
||||
|
||||
/**
|
||||
* Build a virtual product
|
||||
|
||||
+5
-2
@@ -34,8 +34,11 @@ class ProfileCore extends ObjectModel
|
||||
protected $fieldsSizeLang = array('name' => 32);
|
||||
protected $fieldsValidateLang = array('name' => 'isGenericName');
|
||||
|
||||
protected $table = 'profile';
|
||||
protected $identifier = 'id_profile';
|
||||
public static $definition = array(
|
||||
'table' => 'profile',
|
||||
'primary' => 'id_profile',
|
||||
'multilang' => true,
|
||||
);
|
||||
|
||||
public function getFields()
|
||||
{
|
||||
|
||||
@@ -43,8 +43,11 @@ class QuickAccessCore extends ObjectModel
|
||||
protected $fieldsSizeLang = array('name' => 32);
|
||||
protected $fieldsValidateLang = array('name' => 'isGenericName');
|
||||
|
||||
protected $table = 'quick_access';
|
||||
protected $identifier = 'id_quick_access';
|
||||
public static $definition = array(
|
||||
'table' => 'quick_access',
|
||||
'primary' => 'id_quick_access',
|
||||
'multilang' => true,
|
||||
);
|
||||
|
||||
public function getFields()
|
||||
{
|
||||
|
||||
@@ -34,8 +34,10 @@ class RangePriceCore extends ObjectModel
|
||||
protected $fieldsRequired = array('id_carrier', 'delimiter1', 'delimiter2');
|
||||
protected $fieldsValidate = array('id_carrier' => 'isInt', 'delimiter1' => 'isUnsignedFloat', 'delimiter2' => 'isUnsignedFloat');
|
||||
|
||||
protected $table = 'range_price';
|
||||
protected $identifier = 'id_range_price';
|
||||
public static $definition = array(
|
||||
'table' => 'range_price',
|
||||
'primary' => 'id_range_price',
|
||||
);
|
||||
|
||||
protected $webserviceParameters = array(
|
||||
'objectsNodeName' => 'price_ranges',
|
||||
|
||||
@@ -34,8 +34,10 @@ class RangeWeightCore extends ObjectModel
|
||||
protected $fieldsRequired = array('id_carrier', 'delimiter1', 'delimiter2');
|
||||
protected $fieldsValidate = array('id_carrier' => 'isInt', 'delimiter1' => 'isUnsignedFloat', 'delimiter2' => 'isUnsignedFloat');
|
||||
|
||||
protected $table = 'range_weight';
|
||||
protected $identifier = 'id_range_weight';
|
||||
public static $definition = array(
|
||||
'table' => 'range_weight',
|
||||
'primary' => 'id_range_weight',
|
||||
);
|
||||
|
||||
protected $webserviceParameters = array(
|
||||
'objectNodeName' => 'weight_range',
|
||||
|
||||
@@ -73,8 +73,10 @@ class ReferrerCore extends ObjectModel
|
||||
'click_fee' => 'isFloat'
|
||||
);
|
||||
|
||||
protected $table = 'referrer';
|
||||
protected $identifier = 'id_referrer';
|
||||
public static $definition = array(
|
||||
'table' => 'referrer',
|
||||
'primary' => 'id_referrer',
|
||||
);
|
||||
|
||||
protected static $_join = '(r.http_referer_like IS NULL OR r.http_referer_like = \'\' OR cs.http_referer LIKE r.http_referer_like)
|
||||
AND (r.request_uri_like IS NULL OR r.request_uri_like = \'\' OR cs.request_uri LIKE r.request_uri_like)
|
||||
|
||||
@@ -34,8 +34,10 @@ class RequestSqlCore extends ObjectModel
|
||||
protected $fieldsSize = array('name' => 200 , 'sql' => 400);
|
||||
protected $fieldsValidate = array('name' => 'isString', 'sql' => 'isString');
|
||||
|
||||
protected $table = 'request_sql';
|
||||
protected $identifier = 'id_request_sql';
|
||||
public static $definition = array(
|
||||
'table' => 'request_sql',
|
||||
'primary' => 'id_request_sql',
|
||||
);
|
||||
|
||||
public $tested = array('required' => array ('SELECT', 'FROM'),
|
||||
'option' => array('WHERE', 'ORDER', 'LIMIT', 'HAVING', 'GROUP', 'UNION'),
|
||||
|
||||
+5
-2
@@ -42,8 +42,11 @@ class SceneCore extends ObjectModel
|
||||
/** @var array Products */
|
||||
public $products;
|
||||
|
||||
protected $table = 'scene';
|
||||
protected $identifier = 'id_scene';
|
||||
public static $definition = array(
|
||||
'table' => 'scene',
|
||||
'primary' => 'id_scene',
|
||||
'multilang' => true,
|
||||
);
|
||||
|
||||
protected $fieldsRequired = array('active');
|
||||
protected $fieldsValidate = array('active' => 'isBool', 'zones' => 'isSceneZones', 'categories' => 'isArrayWithIds');
|
||||
|
||||
@@ -33,8 +33,10 @@ class SearchEngineCore extends ObjectModel
|
||||
protected $fieldsRequired = array ('server', 'getvar');
|
||||
protected $fieldsValidate = array ('server' => 'isUrl', 'getvar' => 'isModuleName');
|
||||
|
||||
protected $table = 'search_engine';
|
||||
protected $identifier = 'id_search_engine';
|
||||
public static $definition = array(
|
||||
'table' => 'search_engine',
|
||||
'primary' => 'id_search_engine',
|
||||
);
|
||||
|
||||
public function getFields()
|
||||
{
|
||||
|
||||
@@ -43,8 +43,10 @@ class SpecificPriceCore extends ObjectModel
|
||||
protected $fieldsRequired = array('id_product', 'id_shop', 'id_currency', 'id_country', 'id_group', 'price', 'from_quantity', 'reduction', 'reduction_type', 'from', 'to');
|
||||
protected $fieldsValidate = array('id_group_shop' => 'isUnsignedId', 'id_product' => 'isUnsignedId', 'id_product_attribute' => 'isUnsignedId', 'id_shop' => 'isUnsignedId', 'id_country' => 'isUnsignedId', 'id_group' => 'isUnsignedId', 'price' => 'isPrice', 'from_quantity' => 'isUnsignedInt', 'reduction' => 'isPrice', 'reduction_type' => 'isReductionType', 'from' => 'isDateFormat', 'to' => 'isDateFormat');
|
||||
|
||||
protected $table = 'specific_price';
|
||||
protected $identifier = 'id_specific_price';
|
||||
public static $definition = array(
|
||||
'table' => 'specific_price',
|
||||
'primary' => 'id_specific_price',
|
||||
);
|
||||
|
||||
protected static $_specificPriceCache = array();
|
||||
protected static $_cache_priorities = array();
|
||||
|
||||
+4
-2
@@ -46,8 +46,10 @@ class StateCore extends ObjectModel
|
||||
protected $fieldsSize = array('iso_code' => 4, 'name' => 32);
|
||||
protected $fieldsValidate = array('id_country' => 'isUnsignedId', 'id_zone' => 'isUnsignedId', 'iso_code' => 'isStateIsoCode', 'name' => 'isGenericName', 'active' => 'isBool');
|
||||
|
||||
protected $table = 'state';
|
||||
protected $identifier = 'id_state';
|
||||
public static $definition = array(
|
||||
'table' => 'state',
|
||||
'primary' => 'id_state',
|
||||
);
|
||||
|
||||
protected $webserviceParameters = array(
|
||||
'fields' => array(
|
||||
|
||||
+4
-2
@@ -84,8 +84,10 @@ class StoreCore extends ObjectModel
|
||||
'city' => 'isCityName', 'latitude' => 'isCoordinate', 'longitude' => 'isCoordinate', 'hours' => 'isSerializedArray', 'phone' => 'isPhoneNumber', 'fax' => 'isPhoneNumber',
|
||||
'note' => 'isCleanHtml', 'email' => 'isEmail', 'active' => 'isBool');
|
||||
|
||||
protected $table = 'store';
|
||||
protected $identifier = 'id_store';
|
||||
public static $definition = array(
|
||||
'table' => 'store',
|
||||
'primary' => 'id_store',
|
||||
);
|
||||
|
||||
protected $webserviceParameters = array(
|
||||
'fields' => array(
|
||||
|
||||
@@ -33,8 +33,10 @@ class SubDomainCore extends ObjectModel
|
||||
protected $fieldsSize = array('name' => 16);
|
||||
protected $fieldsValidate = array('name' => 'isSubDomainName');
|
||||
|
||||
protected $table = 'subdomain';
|
||||
protected $identifier = 'id_subdomain';
|
||||
public static $definition = array(
|
||||
'table' => 'subdomain',
|
||||
'primary' => 'id_subdomain',
|
||||
);
|
||||
|
||||
public function getFields()
|
||||
{
|
||||
|
||||
@@ -70,8 +70,11 @@ class SupplierCore extends ObjectModel
|
||||
'meta_keywords' => 'isGenericName'
|
||||
);
|
||||
|
||||
protected $table = 'supplier';
|
||||
protected $identifier = 'id_supplier';
|
||||
public static $definition = array(
|
||||
'table' => 'supplier',
|
||||
'primary' => 'id_supplier',
|
||||
'multilang' => true,
|
||||
);
|
||||
|
||||
protected $webserviceParameters = array(
|
||||
'fields' => array(
|
||||
|
||||
+5
-2
@@ -53,8 +53,11 @@ class TabCore extends ObjectModel
|
||||
protected $fieldsSizeLang = array('name' => 32);
|
||||
protected $fieldsValidateLang = array('name' => 'isGenericName');
|
||||
|
||||
protected $table = 'tab';
|
||||
protected $identifier = 'id_tab';
|
||||
public static $definition = array(
|
||||
'table' => 'tab',
|
||||
'primary' => 'id_tab',
|
||||
'multilang' => true,
|
||||
);
|
||||
|
||||
protected static $_getIdFromClassName = null;
|
||||
|
||||
|
||||
+4
-2
@@ -36,8 +36,10 @@ class TagCore extends ObjectModel
|
||||
protected $fieldsRequired = array('id_lang', 'name');
|
||||
protected $fieldsValidate = array('id_lang' => 'isUnsignedId', 'name' => 'isGenericName');
|
||||
|
||||
protected $table = 'tag';
|
||||
protected $identifier = 'id_tag';
|
||||
public static $definition = array(
|
||||
'table' => 'tag',
|
||||
'primary' => 'id_tag',
|
||||
);
|
||||
|
||||
protected $webserviceParameters = array(
|
||||
'fields' => array(
|
||||
|
||||
+5
-2
@@ -31,8 +31,11 @@ class ThemeCore extends ObjectModel
|
||||
|
||||
protected $fieldsSize = array('name' => 64);
|
||||
protected $fieldsValidate = array('name' => 'isGenericName');
|
||||
protected $table = 'theme';
|
||||
protected $identifier = 'id_theme';
|
||||
|
||||
public static $definition = array(
|
||||
'table' => 'theme',
|
||||
'primary' => 'id_theme',
|
||||
);
|
||||
|
||||
public function getFields()
|
||||
{
|
||||
|
||||
+4
-2
@@ -38,8 +38,10 @@ class ZoneCore extends ObjectModel
|
||||
protected $fieldsSize = array('name' => 64);
|
||||
protected $fieldsValidate = array('name' => 'isGenericName', 'active' => 'isBool');
|
||||
|
||||
protected $table = 'zone';
|
||||
protected $identifier = 'id_zone';
|
||||
public static $definition = array(
|
||||
'table' => 'zone',
|
||||
'primary' => 'id_zone',
|
||||
);
|
||||
|
||||
protected $webserviceParameters = array();
|
||||
|
||||
|
||||
@@ -223,8 +223,11 @@ class OrderCore extends ObjectModel
|
||||
);
|
||||
|
||||
/* MySQL does not allow 'order' for a table name */
|
||||
protected $table = 'orders';
|
||||
protected $identifier = 'id_order';
|
||||
public static $definition = array(
|
||||
'table' => 'orders',
|
||||
'primary' => 'id_order',
|
||||
);
|
||||
|
||||
protected $_taxCalculationMethod = PS_TAX_EXC;
|
||||
|
||||
protected static $_historyCache = array();
|
||||
|
||||
@@ -48,8 +48,10 @@ class OrderCartRuleCore extends ObjectModel
|
||||
protected $fieldsValidate = array ('id_order' => 'isUnsignedId', 'name' => 'isGenericName', 'value' => 'isInt');
|
||||
|
||||
/* MySQL does not allow 'order detail' for a table name */
|
||||
protected $table = 'order_cart_rule';
|
||||
protected $identifier = 'id_order_cart_rule';
|
||||
public static $definition = array(
|
||||
'table' => 'order_cart_rule',
|
||||
'primary' => 'id_order_cart_rule',
|
||||
);
|
||||
|
||||
protected $webserviceParameters = array(
|
||||
'fields' => array(
|
||||
|
||||
@@ -174,8 +174,10 @@ class OrderDetailCore extends ObjectModel
|
||||
'total_price_tax_excl' => 'isPrice'
|
||||
);
|
||||
|
||||
protected $table = 'order_detail';
|
||||
protected $identifier = 'id_order_detail';
|
||||
public static $definition = array(
|
||||
'table' => 'order_detail',
|
||||
'primary' => 'id_order_detail',
|
||||
);
|
||||
|
||||
protected $webserviceParameters = array(
|
||||
'fields' => array (
|
||||
|
||||
@@ -47,8 +47,10 @@ class OrderHistoryCore extends ObjectModel
|
||||
protected $fieldsRequired = array('id_order', 'id_order_state');
|
||||
protected $fieldsValidate = array('id_order' => 'isUnsignedId', 'id_order_state' => 'isUnsignedId', 'id_employee' => 'isUnsignedId');
|
||||
|
||||
protected $table = 'order_history';
|
||||
protected $identifier = 'id_order_history';
|
||||
public static $definition = array(
|
||||
'table' => 'order_history',
|
||||
'primary' => 'id_order_history',
|
||||
);
|
||||
|
||||
protected $webserviceParameters = array(
|
||||
'objectsNodeName' => 'order_histories',
|
||||
|
||||
@@ -44,8 +44,11 @@ class OrderMessageCore extends ObjectModel
|
||||
protected $fieldsSizeLang = array('name' => 128, 'message' => 1200);
|
||||
protected $fieldsValidateLang = array('name' => 'isGenericName', 'message' => 'isMessage');
|
||||
|
||||
protected $table = 'order_message';
|
||||
protected $identifier = 'id_order_message';
|
||||
public static $definition = array(
|
||||
'table' => 'order_message',
|
||||
'primary' => 'id_order_message',
|
||||
'multilang' => true,
|
||||
);
|
||||
|
||||
protected $webserviceParameters = array(
|
||||
'fields' => array(
|
||||
|
||||
@@ -53,8 +53,10 @@ class OrderReturnCore extends ObjectModel
|
||||
protected $fieldsRequired = array ('id_customer', 'id_order');
|
||||
protected $fieldsValidate = array('id_customer' => 'isUnsignedId', 'id_order' => 'isUnsignedId', 'question' => 'isMessage');
|
||||
|
||||
protected $table = 'order_return';
|
||||
protected $identifier = 'id_order_return';
|
||||
public static $definition = array(
|
||||
'table' => 'order_return',
|
||||
'primary' => 'id_order_return',
|
||||
);
|
||||
|
||||
public function getFields()
|
||||
{
|
||||
|
||||
@@ -38,8 +38,11 @@ class OrderReturnStateCore extends ObjectModel
|
||||
protected $fieldsSizeLang = array('name' => 64);
|
||||
protected $fieldsValidateLang = array('name' => 'isGenericName');
|
||||
|
||||
protected $table = 'order_return_state';
|
||||
protected $identifier = 'id_order_return_state';
|
||||
public static $definition = array(
|
||||
'table' => 'order_return_state',
|
||||
'primary' => 'id_order_return_state',
|
||||
'multilang' => true,
|
||||
);
|
||||
|
||||
public function getFields()
|
||||
{
|
||||
|
||||
@@ -62,8 +62,10 @@ class OrderSlipCore extends ObjectModel
|
||||
protected $fieldsRequired = array ('id_customer', 'id_order', 'conversion_rate');
|
||||
protected $fieldsValidate = array('id_customer' => 'isUnsignedId', 'id_order' => 'isUnsignedId', 'conversion_rate' => 'isFloat');
|
||||
|
||||
protected $table = 'order_slip';
|
||||
protected $identifier = 'id_order_slip';
|
||||
public static $definition = array(
|
||||
'table' => 'order_slip',
|
||||
'primary' => 'id_order_slip',
|
||||
);
|
||||
|
||||
public function getFields()
|
||||
{
|
||||
|
||||
@@ -68,8 +68,11 @@ class OrderStateCore extends ObjectModel
|
||||
protected $fieldsSizeLang = array('name' => 64, 'template' => 64);
|
||||
protected $fieldsValidateLang = array('name' => 'isGenericName', 'template' => 'isTplName');
|
||||
|
||||
protected $table = 'order_state';
|
||||
protected $identifier = 'id_order_state';
|
||||
public static $definition = array(
|
||||
'table' => 'order_state',
|
||||
'primary' => 'id_order_state',
|
||||
'multilang' => true,
|
||||
);
|
||||
|
||||
protected $webserviceParameters = array(
|
||||
'fields' => array(
|
||||
|
||||
@@ -45,8 +45,11 @@ class GroupShopCore extends ObjectModel
|
||||
'share_stock' => 'isBool',
|
||||
'name' => 'isGenericName',
|
||||
);
|
||||
protected $table = 'group_shop';
|
||||
protected $identifier = 'id_group_shop';
|
||||
|
||||
public static $definition = array(
|
||||
'table' => 'group_shop',
|
||||
'primary' => 'id_group_shop',
|
||||
);
|
||||
|
||||
private static $assoTables = array(
|
||||
'attribute_group' => array('type' => 'group_shop'),
|
||||
|
||||
@@ -54,8 +54,11 @@ class ShopCore extends ObjectModel
|
||||
'active' => 'isBool',
|
||||
'name' => 'isGenericName',
|
||||
);
|
||||
protected $table = 'shop';
|
||||
protected $identifier = 'id_shop';
|
||||
|
||||
public static $definition = array(
|
||||
'table' => 'shop',
|
||||
'primary' => 'id_shop',
|
||||
);
|
||||
|
||||
/** @var array List of shops cached */
|
||||
protected static $shops;
|
||||
|
||||
@@ -42,8 +42,10 @@ class ShopUrlCore extends ObjectModel
|
||||
protected $fieldsSize = array('domain' => 255, 'physical_uri' => 64, 'virtual_uri' => 64);
|
||||
protected $fieldsValidate = array('active' => 'isBool');
|
||||
|
||||
protected $table = 'shop_url';
|
||||
protected $identifier = 'id_shop_url';
|
||||
public static $definition = array(
|
||||
'table' => 'shop_url',
|
||||
'primary' => 'id_shop_url',
|
||||
);
|
||||
|
||||
public function getFields()
|
||||
{
|
||||
|
||||
@@ -74,8 +74,10 @@ class StockAvailableCore extends ObjectModel
|
||||
'out_of_stock' => 'isInt'
|
||||
);
|
||||
|
||||
protected $table = 'stock_available';
|
||||
protected $identifier = 'id_stock_available';
|
||||
public static $definition = array(
|
||||
'table' => 'stock_available',
|
||||
'primary' => 'id_stock_available',
|
||||
);
|
||||
|
||||
public function getFields()
|
||||
{
|
||||
|
||||
@@ -122,8 +122,10 @@ class StockMvtCore extends ObjectModel
|
||||
*/
|
||||
public $quantity;
|
||||
|
||||
protected $table = 'stock_mvt';
|
||||
protected $identifier = 'id_stock_mvt';
|
||||
public static $definition = array(
|
||||
'table' => 'stock_mvt',
|
||||
'primary' => 'id_stock_mvt',
|
||||
);
|
||||
|
||||
protected $fieldsRequired = array(
|
||||
'date_add',
|
||||
|
||||
@@ -45,8 +45,12 @@ class StockMvtReasonCore extends ObjectModel
|
||||
/** @var boolean True if the movement reason has been deleted (staying in database as deleted) */
|
||||
public $deleted = 0;
|
||||
|
||||
protected $table = 'stock_mvt_reason';
|
||||
protected $identifier = 'id_stock_mvt_reason';
|
||||
public static $definition = array(
|
||||
'table' => 'stock_mvt_reason',
|
||||
'primary' => 'id_stock_mvt_reason',
|
||||
'multilang' => true,
|
||||
);
|
||||
|
||||
protected $fieldsRequiredLang = array('name');
|
||||
protected $fieldsSizeLang = array('name' => 255);
|
||||
protected $fieldsValidateLang = array('name' => 'isGenericName');
|
||||
|
||||
@@ -154,15 +154,10 @@ class SupplyOrderCore extends ObjectModel
|
||||
'is_template' => 'isBool',
|
||||
);
|
||||
|
||||
/**
|
||||
* @var string Database table name
|
||||
*/
|
||||
protected $table = 'supply_order';
|
||||
|
||||
/**
|
||||
* @var string Database ID name
|
||||
*/
|
||||
protected $identifier = 'id_supply_order';
|
||||
public static $definition = array(
|
||||
'table' => 'supply_order',
|
||||
'primary' => 'id_supply_order',
|
||||
);
|
||||
|
||||
public function getFields()
|
||||
{
|
||||
|
||||
@@ -76,15 +76,10 @@ class SupplyOrderHistoryCore extends ObjectModel
|
||||
'date_add' => 'isDate'
|
||||
);
|
||||
|
||||
/**
|
||||
* @var string Database table name
|
||||
*/
|
||||
protected $table = 'supply_order_history';
|
||||
|
||||
/**
|
||||
* @var string Database ID name
|
||||
*/
|
||||
protected $identifier = 'id_supply_order_history';
|
||||
public static $definition = array(
|
||||
'table' => 'supply_order_history',
|
||||
'primary' => 'id_supply_order_history',
|
||||
);
|
||||
|
||||
public function getFields()
|
||||
{
|
||||
|
||||
@@ -82,15 +82,10 @@ class SupplyOrderReceiptHistoryCore extends ObjectModel
|
||||
'date_add' => 'isDate'
|
||||
);
|
||||
|
||||
/**
|
||||
* @var string Database table name
|
||||
*/
|
||||
protected $table = 'supply_order_receipt_history';
|
||||
|
||||
/**
|
||||
* @var string Database ID name
|
||||
*/
|
||||
protected $identifier = 'id_supply_order_receipt_history';
|
||||
public static $definition = array(
|
||||
'table' => 'supply_order_receipt_history',
|
||||
'primary' => 'id_supply_order_receipt_history',
|
||||
);
|
||||
|
||||
public function getFields()
|
||||
{
|
||||
|
||||
@@ -78,15 +78,11 @@ class SupplyOrderStateCore extends ObjectModel
|
||||
protected $fieldsSizeLang = array('name' => 128);
|
||||
protected $fieldsValidateLang = array('name' => 'isGenericName');
|
||||
|
||||
/**
|
||||
* @var string Database table name
|
||||
*/
|
||||
protected $table = 'supply_order_state';
|
||||
|
||||
/**
|
||||
* @var string Database ID name
|
||||
*/
|
||||
protected $identifier = 'id_supply_order_state';
|
||||
public static $definition = array(
|
||||
'table' => 'supply_order_state',
|
||||
'primary' => 'id_supply_order_state',
|
||||
'multilang' => true,
|
||||
);
|
||||
|
||||
/**
|
||||
* @see ObjectModel::getFields()
|
||||
|
||||
@@ -83,8 +83,10 @@ class WarehouseCore extends ObjectModel
|
||||
'id_currency' => 'isUnsignedId'
|
||||
);
|
||||
|
||||
protected $table = 'warehouse';
|
||||
protected $identifier = 'id_warehouse';
|
||||
public static $definition = array(
|
||||
'table' => 'warehouse',
|
||||
'primary' => 'id_warehouse',
|
||||
);
|
||||
|
||||
public function getFields()
|
||||
{
|
||||
|
||||
+4
-2
@@ -49,8 +49,10 @@ class TaxCore extends ObjectModel
|
||||
protected $fieldsSizeLang = array('name' => 32);
|
||||
protected $fieldsValidateLang = array('name' => 'isGenericName');
|
||||
|
||||
protected $table = 'tax';
|
||||
protected $identifier = 'id_tax';
|
||||
public static $definition = array(
|
||||
'table' => 'tax',
|
||||
'primary' => 'id_tax',
|
||||
);
|
||||
|
||||
protected static $_product_country_tax = array();
|
||||
protected static $_product_tax_via_rules = array();
|
||||
|
||||
@@ -46,8 +46,10 @@ class TaxRuleCore extends ObjectModel
|
||||
'behavior' => 'isUnsignedInt',
|
||||
'description' => 'isString');
|
||||
|
||||
protected $table = 'tax_rule';
|
||||
protected $identifier = 'id_tax_rule';
|
||||
public static $definition = array(
|
||||
'table' => 'tax_rule',
|
||||
'primary' => 'id_tax_rule',
|
||||
);
|
||||
|
||||
public function getFields()
|
||||
{
|
||||
|
||||
@@ -37,8 +37,10 @@ class TaxRulesGroupCore extends ObjectModel
|
||||
protected $fieldsSize = array('name' => 64);
|
||||
protected $fieldsValidate = array('name' => 'isGenericName');
|
||||
|
||||
protected $table = 'tax_rules_group';
|
||||
protected $identifier = 'id_tax_rules_group';
|
||||
public static $definition = array(
|
||||
'table' => 'tax_rules_group',
|
||||
'primary' => 'id_tax_rules_group',
|
||||
);
|
||||
|
||||
protected static $_taxes = array();
|
||||
|
||||
|
||||
@@ -40,9 +40,10 @@ class WebserviceKeyCore extends ObjectModel
|
||||
protected $fieldsSize = array('key' => 32);
|
||||
protected $fieldsValidate = array('active' => 'isBool');
|
||||
|
||||
protected $table = 'webservice_account';
|
||||
protected $identifier = 'id_webservice_account';
|
||||
|
||||
public static $definition = array(
|
||||
'table' => 'webservice_account',
|
||||
'primary' => 'id_webservice_account',
|
||||
);
|
||||
|
||||
public function add($autodate = true, $nullValues = false)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user