Holds Stock
- Class name: WarehouseCore
- Parent class: ObjectModel
- Source: classes/stock/Warehouse.php line 32
- $definition
- $deleted
- $id
- $id_address
- $id_currency
- $id_employee
- $management_type
- $name
- $reference
- $webserviceParameters
- $cache_objects
- $db
- $def
- $fieldsRequired
- $fieldsRequiredDatabase
- $fieldsRequiredLang
- $fieldsSize
- $fieldsSizeLang
- $fieldsValidate
- $fieldsValidateLang
- $force_id
- $get_shop_from_context
- $id_lang
- $id_shop
- $id_shop_list
- $identifier
- $image_dir
- $image_format
- $loaded_classes
- $table
- $tables
- $update_fields
- __construct
- add
- addFieldsRequiredDatabase
- associateTo
- cacheFieldsRequiredDatabase
- clearCache
- delete
- deleteImage
- deleteSelection
- disableCache
- displayFieldName
- duplicateObject
- duplicateShops
- enableCache
- exists
- existsInDatabase
- formatFields
- formatValue
- getAssociatedShops
- getCarriers
- getDefinition
- getFieldByLang
- getFields
- getFieldsLang
- getFieldsRequiredDatabase
- getFieldsShop
- getNumberOfProducts
- getPackWarehouses
- getProductLocation
- getProductWarehouseList
- getQuantitiesOfProducts
- getRepositoryClassName
- getShops
- getStockValue
- getTranslationsFields
- getValidationRules
- getWarehouseNameById
- getWarehouses
- getWarehousesByEmployee
- getWarehousesByProductId
- getWarehousesGroupedByShops
- getWebserviceObjectList
- getWebserviceParameters
- getWsCarriers
- getWsShops
- getWsStockValue
- getWsStocks
- hasMultishopEntries
- hydrate
- hydrateCollection
- isAssociatedToShop
- isCurrentlyUsed
- isEmpty
- isLangMultishop
- isMultiShopField
- isMultishop
- makeTranslationFields
- removeCarrier
- resetProductsLocations
- resetStockAvailable
- save
- setCarriers
- setDefinitionRetrocompatibility
- setFieldsToUpdate
- setProductLocation
- toggleStatus
- update
- updateMultishopTable
- validateControler
- validateController
- validateField
- validateFields
- validateFieldsLang
- validateFieldsRequiredDatabase
public mixed $definition = array('table' => 'warehouse', 'primary' => 'id_warehouse', 'fields' => array('id_address' => array('type' => self::TYPE_INT, 'validate' => 'isUnsignedId', 'required' => true), 'reference' => array('type' => self::TYPE_STRING, 'validate' => 'isString', 'required' => true, 'size' => 45), 'name' => array('type' => self::TYPE_STRING, 'validate' => 'isString', 'required' => true, 'size' => 45), 'id_employee' => array('type' => self::TYPE_INT, 'validate' => 'isUnsignedId', 'required' => true), 'management_type' => array('type' => self::TYPE_STRING, 'validate' => 'isStockManagement', 'required' => true), 'id_currency' => array('type' => self::TYPE_INT, 'validate' => 'isUnsignedId', 'required' => true), 'deleted' => array('type' => self::TYPE_BOOL)))
- Visibility: public
- This property is static.
- Source: classes/stock/Warehouse.php line 65.
public boolean $deleted
- Visibility: public
- Source: classes/stock/Warehouse.php line 53.
public integer $id
- Visibility: public
- Source: classes/stock/Warehouse.php line 35.
public integer $id_address
- Visibility: public
- Source: classes/stock/Warehouse.php line 38.
public integer $id_currency
- Visibility: public
- Source: classes/stock/Warehouse.php line 50.
public integer $id_employee
- Visibility: public
- Source: classes/stock/Warehouse.php line 47.
public string $management_type
Describes the way a Warehouse is managed
- Visibility: public
- Source: classes/stock/Warehouse.php line 60.
public string $name
- Visibility: public
- Source: classes/stock/Warehouse.php line 44.
public string $reference
- Visibility: public
- Source: classes/stock/Warehouse.php line 41.
protected mixed $webserviceParameters = array('fields' => array('id_address' => array('xlink_resource' => 'addresses'), 'id_employee' => array('xlink_resource' => 'employees'), 'id_currency' => array('xlink_resource' => 'currencies'), 'valuation' => array('getter' => 'getWsStockValue', 'setter' => false), 'deleted' => array()), 'associations' => array('stocks' => array('resource' => 'stock', 'fields' => array('id' => array())), 'carriers' => array('resource' => 'carrier', 'fields' => array('id' => array())), 'shops' => array('resource' => 'shop', 'fields' => array('id' => array(), 'name' => array()))))
- Visibility: protected
- Source: classes/stock/Warehouse.php line 82.
protected boolean $cache_objects = true
- Visibility: protected
- This property is static.
- This property is defined by ObjectModelCore.
- Source: classes/ObjectModel.php line 164.
protected \Db $db = false
- Visibility: protected
- This property is static.
- This property is defined by ObjectModelCore.
- Source: classes/ObjectModel.php line 156.
protected array $def
- Visibility: protected
- This property is defined by ObjectModelCore.
- Source: classes/ObjectModel.php line 150.
protected array $fieldsRequired = array()
- Visibility: protected
- This property is defined by ObjectModelCore.
- Source: classes/ObjectModel.php line 88.
protected array $fieldsRequiredDatabase = null
- Visibility: protected
- This property is static.
- This property is defined by ObjectModelCore.
- Source: classes/ObjectModel.php line 70.
protected array $fieldsRequiredLang = array()
- Visibility: protected
- This property is defined by ObjectModelCore.
- Source: classes/ObjectModel.php line 106.
protected array $fieldsSize = array()
- Visibility: protected
- This property is defined by ObjectModelCore.
- Source: classes/ObjectModel.php line 94.
protected array $fieldsSizeLang = array()
- Visibility: protected
- This property is defined by ObjectModelCore.
- Source: classes/ObjectModel.php line 112.
protected array $fieldsValidate = array()
- Visibility: protected
- This property is defined by ObjectModelCore.
- Source: classes/ObjectModel.php line 100.
protected array $fieldsValidateLang = array()
- Visibility: protected
- This property is defined by ObjectModelCore.
- Source: classes/ObjectModel.php line 118.
public boolean $force_id = false
- Visibility: public
- This property is defined by ObjectModelCore.
- Source: classes/ObjectModel.php line 159.
protected boolean $get_shop_from_context = true
- Visibility: protected
- This property is defined by ObjectModelCore.
- Source: classes/ObjectModel.php line 67.
protected integer $id_lang = null
- Visibility: protected
- This property is defined by ObjectModelCore.
- Source: classes/ObjectModel.php line 58.
protected integer $id_shop = null
- Visibility: protected
- This property is defined by ObjectModelCore.
- Source: classes/ObjectModel.php line 61.
public array $id_shop_list = null
- Visibility: public
- This property is defined by ObjectModelCore.
- Source: classes/ObjectModel.php line 64.
protected string $identifier
- Visibility: protected
- This property is defined by ObjectModelCore.
- Source: classes/ObjectModel.php line 82.
protected string $image_dir = null
- Visibility: protected
- This property is defined by ObjectModelCore.
- Source: classes/ObjectModel.php line 130.
protected String $image_format = 'jpg'
- Visibility: protected
- This property is defined by ObjectModelCore.
- Source: classes/ObjectModel.php line 133.
protected array $loaded_classes = array()
Holds compiled definitions of each ObjectModel class.
Values are assigned during object initialization.
- Visibility: protected
- This property is static.
- This property is defined by ObjectModelCore.
- Source: classes/ObjectModel.php line 147.
protected string $table
- Visibility: protected
- This property is defined by ObjectModelCore.
- Source: classes/ObjectModel.php line 76.
protected array $tables = array()
- Visibility: protected
- This property is defined by ObjectModelCore.
- Source: classes/ObjectModel.php line 124.
protected array $update_fields = null
- Visibility: protected
- This property is defined by ObjectModelCore.
- Source: classes/ObjectModel.php line 153.
mixed ObjectModelCore::__construct(integer|null $id, integer|null $id_lang, integer|null $id_shop)
Builds the object
- Visibility: public
- This method is defined by ObjectModelCore.
- Source: classes/ObjectModel.php line 201
- $id integer|null - If specified, loads and existing object from DB (optional).
- $id_lang integer|null - Required if object is multilingual (optional).
- $id_shop integer|null - ID shop for objects with multishop tables.
boolean ObjectModelCore::add(boolean $auto_date, boolean $null_values)
Adds current object to the database
- Visibility: public
- This method is defined by ObjectModelCore.
- Source: classes/ObjectModel.php line 458
- $auto_date boolean
- $null_values boolean
boolean ObjectModelCore::addFieldsRequiredDatabase(array $fields)
Sets required field for this class in the database.
- Visibility: public
- This method is defined by ObjectModelCore.
- Source: classes/ObjectModel.php line 1390
- $fields array
boolean|void ObjectModelCore::associateTo(integer|array $id_shops)
This function associate an item to its context
- Visibility: public
- This method is defined by ObjectModelCore.
- Source: classes/ObjectModel.php line 1464
- $id_shops integer|array
mixed ObjectModelCore::cacheFieldsRequiredDatabase(boolean $all)
Caches data about required objects fields in memory
- Visibility: public
- This method is defined by ObjectModelCore.
- Source: classes/ObjectModel.php line 1368
- $all boolean - If true, caches required fields of all object classes.
mixed ObjectModelCore::clearCache(boolean $all)
Clears cache entries that have this object's ID.
- Visibility: public
- This method is defined by ObjectModelCore.
- Source: classes/ObjectModel.php line 1414
- $all boolean - If true, clears cache for all objects
boolean ObjectModelCore::delete()
Deletes current object from database
- Visibility: public
- This method is defined by ObjectModelCore.
- Source: classes/ObjectModel.php line 743
boolean ObjectModelCore::deleteImage(boolean $force_delete)
Delete images associated with the object
- Visibility: public
- This method is defined by ObjectModelCore.
- Source: classes/ObjectModel.php line 1643
- $force_delete boolean
boolean ObjectModelCore::deleteSelection(array $ids)
Deletes multiple objects from the database at once
- Visibility: public
- This method is defined by ObjectModelCore.
- Source: classes/ObjectModel.php line 790
- $ids array - Array of objects IDs.
mixed ObjectModelCore::disableCache()
Disables object caching
- Visibility: public
- This method is static.
- This method is defined by ObjectModelCore.
- Source: classes/ObjectModel.php line 1969
string ObjectModelCore::displayFieldName(string $field, string $class, boolean $htmlentities, \Context|null $context)
Returns field name translation
- Visibility: public
- This method is static.
- This method is defined by ObjectModelCore.
- Source: classes/ObjectModel.php line 1083
- $field string - Field name
- $class string - ObjectModel class name
- $htmlentities boolean - If true, applies htmlentities() to result string
- $context Context|null - Context object
\ObjectModel|false ObjectModelCore::duplicateObject()
Takes current object ID, gets its values from database, saves them in a new row and loads newly saved values as a new object.
- Visibility: public
- This method is defined by ObjectModelCore.
- Source: classes/ObjectModel.php line 549
boolean|void ObjectModelCore::duplicateShops($id)
Copies shop association data from object with specified ID.
- Visibility: public
- This method is defined by ObjectModelCore.
- Source: classes/ObjectModel.php line 1523
- $id mixed
mixed ObjectModelCore::enableCache()
Enables object caching
- Visibility: public
- This method is static.
- This method is defined by ObjectModelCore.
- Source: classes/ObjectModel.php line 1961
boolean WarehouseCore::exists(integer $id_warehouse)
Checks if the given warehouse exists
- Visibility: public
- This method is static.
- Source: classes/stock/Warehouse.php line 224
- $id_warehouse integer
boolean ObjectModelCore::existsInDatabase(integer $id_entity, string $table)
Checks if an object exists in database.
- Visibility: public
- This method is static.
- This method is defined by ObjectModelCore.
- Source: classes/ObjectModel.php line 1686
- $id_entity integer
- $table string
array ObjectModelCore::formatFields(integer $type, integer $id_lang)
Formats values of each fields.
- Visibility: protected
- This method is defined by ObjectModelCore.
- Source: classes/ObjectModel.php line 327
- $type integer - FORMAT_COMMON or FORMAT_LANG or FORMAT_SHOP
- $id_lang integer - If this parameter is given, only take lang fields
mixed ObjectModelCore::formatValue(mixed $value, integer $type, boolean $with_quotes, boolean $purify, boolean $allow_null)
Formats a value
- Visibility: public
- This method is static.
- This method is defined by ObjectModelCore.
- Source: classes/ObjectModel.php line 381
- $value mixed
- $type integer
- $with_quotes boolean
- $purify boolean
- $allow_null boolean
array ObjectModelCore::getAssociatedShops()
Gets the list of associated shop IDs
- Visibility: public
- This method is defined by ObjectModelCore.
- Source: classes/ObjectModel.php line 1499
array WarehouseCore::getCarriers($return_reference)
Gets the carriers associated to the current warehouse
- Visibility: public
- Source: classes/stock/Warehouse.php line 135
- $return_reference mixed
array ObjectModelCore::getDefinition(string $class, string|null $field)
Returns object definition
- Visibility: public
- This method is static.
- This method is defined by ObjectModelCore.
- Source: classes/ObjectModel.php line 1809
- $class string - Name of object
- $field string|null - Name of field if we want the definition of one field only
mixed ObjectModelCore::getFieldByLang(string $field_name, integer|null $id_lang)
Return the field value for the specified language if the field is multilang, else the field value.
- Visibility: public
- This method is defined by ObjectModelCore.
- Source: classes/ObjectModel.php line 1927
- $field_name string
- $id_lang integer|null
array ObjectModelCore::getFields()
Prepare fields for ObjectModel class (add, update) All fields are verified (pSQL, intval, .
..)
- Visibility: public
- This method is defined by ObjectModelCore.
- Source: classes/ObjectModel.php line 244
array ObjectModelCore::getFieldsLang()
Prepare multilang fields
- Visibility: public
- This method is defined by ObjectModelCore.
- Source: classes/ObjectModel.php line 288
array|null ObjectModelCore::getFieldsRequiredDatabase(boolean $all)
Returns an array of required fields
- Visibility: public
- This method is defined by ObjectModelCore.
- Source: classes/ObjectModel.php line 1355
- $all boolean - If true, returns required fields of all object classes.
array ObjectModelCore::getFieldsShop()
Prepare fields for multishop Fields are not validated here, we consider they are already validated in getFields() method, this is not the best solution but this is the only one possible for retro compatibility.
- Visibility: public
- This method is defined by ObjectModelCore.
- Source: classes/ObjectModel.php line 270
integer WarehouseCore::getNumberOfProducts()
Gets the number of products in the current warehouse
- Visibility: public
- Source: classes/stock/Warehouse.php line 390
array|boolean WarehouseCore::getPackWarehouses(integer $id_product, $id_shop)
For a given pack, returns the warehouse it can be shipped from
- Visibility: public
- This method is static.
- Source: classes/stock/Warehouse.php line 502
- $id_product integer
- $id_shop mixed
string WarehouseCore::getProductLocation(integer $id_product, integer $id_product_attribute, integer $id_warehouse)
For a given {product, product attribute} gets its location in the given warehouse
- Visibility: public
- This method is static.
- Source: classes/stock/Warehouse.php line 280
- $id_product integer - ID of the product
- $id_product_attribute integer - Use 0 if this product does not have attributes
- $id_warehouse integer - ID of the warehouse
array WarehouseCore::getProductWarehouseList(integer $id_product, integer $id_product_attribute, integer $id_shop)
For a given {product, product attribute} gets warehouse list
- Visibility: public
- This method is static.
- Source: classes/stock/Warehouse.php line 300
- $id_product integer - ID of the product
- $id_product_attribute integer - Optional, uses 0 if this product does not have attributes
- $id_shop integer - Optional, ID of the shop. Uses the context shop id (@see Context::shop)
integer WarehouseCore::getQuantitiesOfProducts()
Gets the number of quantities - for all products - in the current warehouse
- Visibility: public
- Source: classes/stock/Warehouse.php line 410
mixed ObjectModelCore::getRepositoryClassName()
Returns the name of the repository class for this entity.
If unspecified, a generic repository will be used for the entity.
- Visibility: public
- This method is static.
- This method is defined by ObjectModelCore.
- Source: classes/ObjectModel.php line 166
array WarehouseCore::getShops()
Gets the shops associated to the current warehouse
- Visibility: public
- Source: classes/stock/Warehouse.php line 118
integer WarehouseCore::getStockValue()
Gets the value of the stock in the current warehouse
- Visibility: public
- Source: classes/stock/Warehouse.php line 427
array ObjectModelCore::getTranslationsFields(array $fields_array)
- Visibility: protected
- This method is defined by ObjectModelCore.
- Source: classes/ObjectModel.php line 831
- $fields_array array
array ObjectModelCore::getValidationRules(string $class)
Returns object validation rules (fields validity)
- Visibility: public
- This method is static.
- This method is defined by ObjectModelCore.
- Source: classes/ObjectModel.php line 178
- $class string - Child class name for static use (optional)
string WarehouseCore::getWarehouseNameById(integer $id_warehouse)
For a given $id_warehouse, returns its name
- Visibility: public
- This method is static.
- Source: classes/stock/Warehouse.php line 487
- $id_warehouse integer - Warehouse Id
array WarehouseCore::getWarehouses(boolean $ignore_shop, integer $id_shop)
Gets available warehouses It is possible via ignore_shop and id_shop to filter the list with shop id
- Visibility: public
- This method is static.
- Source: classes/stock/Warehouse.php line 344
- $ignore_shop boolean - Optional, false by default - Allows to get only the warehouses that are associated to one/some shops (@see $id_shop)
- $id_shop integer - Optional, Context::shop::Id by default - Allows to define a specific shop to filter.
array WarehouseCore::getWarehousesByEmployee(integer $id_employee)
For a given employee, gets the warehouse(s) he/she manages
- Visibility: public
- This method is static.
- Source: classes/stock/Warehouse.php line 443
- $id_employee integer - Manager ID
array WarehouseCore::getWarehousesByProductId(integer $id_product, integer $id_product_attribute)
For a given product, returns the warehouses it is stored in
- Visibility: public
- This method is static.
- Source: classes/stock/Warehouse.php line 460
- $id_product integer - Product Id
- $id_product_attribute integer - Optional, Product Attribute Id - 0 by default (no attribues)
array WarehouseCore::getWarehousesGroupedByShops()
Gets warehouses grouped by shops
- Visibility: public
- This method is static.
- Source: classes/stock/Warehouse.php line 369
array|null ObjectModelCore::getWebserviceObjectList(string $sql_join, string $sql_filter, string $sql_sort, string $sql_limit)
Returns webservice object list.
- Visibility: public
- This method is defined by ObjectModelCore.
- Source: classes/ObjectModel.php line 1279
- $sql_join string
- $sql_filter string
- $sql_sort string
- $sql_limit string
array ObjectModelCore::getWebserviceParameters(string|null $ws_params_attribute_name)
Returns webservice parameters of this object.
- Visibility: public
- This method is defined by ObjectModelCore.
- Source: classes/ObjectModel.php line 1176
- $ws_params_attribute_name string|null
array WarehouseCore::getWsCarriers()
Webservice : gets the ids carriers associated to this warehouse
- Visibility: public
- Source: classes/stock/Warehouse.php line 604
array WarehouseCore::getWsShops()
Webservice : gets the ids shops associated to this warehouse
- Visibility: public
- Source: classes/stock/Warehouse.php line 588
integer WarehouseCore::getWsStockValue()
Webservice : gets the value of the warehouse
- Visibility: public
- Source: classes/stock/Warehouse.php line 565
array WarehouseCore::getWsStocks()
Webservice : gets the ids stock associated to this warehouse
- Visibility: public
- Source: classes/stock/Warehouse.php line 574
boolean ObjectModelCore::hasMultishopEntries()
Checks if there is more than one entry in associated shop table for current object.
- Visibility: public
- This method is defined by ObjectModelCore.
- Source: classes/ObjectModel.php line 1550
mixed ObjectModelCore::hydrate(array $data, integer|null $id_lang)
Fill an object with given data. Data must be an array with this syntax: array(objProperty => value, objProperty2 => value, etc.)
- Visibility: public
- This method is defined by ObjectModelCore.
- Source: classes/ObjectModel.php line 1730
- $data array
- $id_lang integer|null
array ObjectModelCore::hydrateCollection(string $class, array $datas, integer|null $id_lang)
Fill (hydrate) a list of objects in order to get a collection of these objects
- Visibility: public
- This method is static.
- This method is defined by ObjectModelCore.
- Source: classes/ObjectModel.php line 1755
- $class string - Class of objects to hydrate
- $datas array - List of data (multi-dimensional array)
- $id_lang integer|null
boolean ObjectModelCore::isAssociatedToShop(integer|null $id_shop)
Checks if current object is associated to a shop.
- Visibility: public
- This method is defined by ObjectModelCore.
- Source: classes/ObjectModel.php line 1430
- $id_shop integer|null
boolean ObjectModelCore::isCurrentlyUsed(string|null $table, boolean $has_active_column)
Checks if an object type exists in the database.
- Visibility: public
- This method is static.
- This method is defined by ObjectModelCore.
- Source: classes/ObjectModel.php line 1706
- $table string|null - Name of table linked to entity
- $has_active_column boolean - True if the table has an active column
boolean WarehouseCore::isEmpty()
Checks if a warehouse is empty - i.e. has no stock
- Visibility: public
- Source: classes/stock/Warehouse.php line 209
boolean ObjectModelCore::isLangMultishop()
Checks if the object is both multi-language and multi-shop.
- Visibility: public
- This method is defined by ObjectModelCore.
- Source: classes/ObjectModel.php line 1586
boolean ObjectModelCore::isMultiShopField(string $field)
Checks if a field is a multi-shop field.
- Visibility: public
- This method is defined by ObjectModelCore.
- Source: classes/ObjectModel.php line 1576
- $field string
boolean ObjectModelCore::isMultishop()
Checks if object is multi-shop object.
- Visibility: public
- This method is defined by ObjectModelCore.
- Source: classes/ObjectModel.php line 1564
mixed ObjectModelCore::makeTranslationFields(array $fields, array $fields_array, integer $id_language)
- Visibility: protected
- This method is defined by ObjectModelCore.
- Source: classes/ObjectModel.php line 854
- $fields array
- $fields_array array
- $id_language integer
mixed WarehouseCore::removeCarrier(integer $id_carrier, integer $id_warehouse)
For a given carrier, removes it from the warehouse/carrier association If $id_warehouse is set, it only removes the carrier for this warehouse
- Visibility: public
- This method is static.
- Source: classes/stock/Warehouse.php line 196
- $id_carrier integer - Id of the carrier to remove
- $id_warehouse integer - optional Id of the warehouse to filter
mixed WarehouseCore::resetProductsLocations()
Resets all product locations for this warehouse
- Visibility: public
- Source: classes/stock/Warehouse.php line 265
mixed WarehouseCore::resetStockAvailable()
- Visibility: public
- Source: classes/stock/Warehouse.php line 547
boolean ObjectModelCore::save(boolean $null_values, boolean $auto_date)
Saves current object to database (add or update)
- Visibility: public
- This method is defined by ObjectModelCore.
- Source: classes/ObjectModel.php line 443
- $null_values boolean
- $auto_date boolean
mixed WarehouseCore::setCarriers(array $ids_carriers)
Sets the carriers associated to the current warehouse
- Visibility: public
- Source: classes/stock/Warehouse.php line 169
- $ids_carriers array
mixed ObjectModelCore::setDefinitionRetrocompatibility()
Retrocompatibility for classes without $definition static
- Visibility: protected
- This method is defined by ObjectModelCore.
- Source: classes/ObjectModel.php line 1855
mixed ObjectModelCore::setFieldsToUpdate(array $fields)
Set a list of specific fields to update array(field1 => true, field2 => false, langfield1 => array(1 => true, 2 => false))
- Visibility: public
- This method is defined by ObjectModelCore.
- Source: classes/ObjectModel.php line 1953
- $fields array
boolean WarehouseCore::setProductLocation(integer $id_product, integer $id_product_attribute, integer $id_warehouse, string $location)
For a given {product, product attribute} sets its location in the given warehouse First, for the given parameters, it cleans the database before updating
- Visibility: public
- This method is static.
- Source: classes/stock/Warehouse.php line 244
- $id_product integer - ID of the product
- $id_product_attribute integer - Use 0 if this product does not have attributes
- $id_warehouse integer - ID of the warehouse
- $location string - Describes the location (no lang id required)
boolean ObjectModelCore::toggleStatus()
Toggles object status in database
- Visibility: public
- This method is defined by ObjectModelCore.
- Source: classes/ObjectModel.php line 807
boolean ObjectModelCore::update(boolean $null_values)
Updates the current object in the database
- Visibility: public
- This method is defined by ObjectModelCore.
- Source: classes/ObjectModel.php line 619
- $null_values boolean
boolean ObjectModelCore::updateMultishopTable(string $classname, array $data, string $where, string $specific_where)
Updates a table and splits the common datas and the shop datas.
- Visibility: public
- This method is static.
- This method is defined by ObjectModelCore.
- Source: classes/ObjectModel.php line 1602
- $classname string
- $data array
- $where string
- $specific_where string - Only executed for common table
array ObjectModelCore::validateControler(boolean $htmlentities)
- Visibility: public
- This method is defined by ObjectModelCore.
- Source: classes/ObjectModel.php line 1105
- $htmlentities boolean
array ObjectModelCore::validateController(boolean $htmlentities)
Validates submitted values and returns an array of errors, if any.
- Visibility: public
- This method is defined by ObjectModelCore.
- Source: classes/ObjectModel.php line 1118
- $htmlentities boolean - If true, uses htmlentities() for field name translations in errors.
true|string ObjectModelCore::validateField(string $field, mixed $value, integer|null $id_lang, array $skip, boolean $human_errors)
Validate a single field
- Visibility: public
- This method is defined by ObjectModelCore.
- Source: classes/ObjectModel.php line 977
- $field string - Field name
- $value mixed - Field value
- $id_lang integer|null - Language ID
- $skip array - Array of fields to skip.
- $human_errors boolean - If true, uses more descriptive, translatable error strings.
boolean|string ObjectModelCore::validateFields(boolean $die, boolean $error_return)
Checks if object field values are valid before database interaction
- Visibility: public
- This method is defined by ObjectModelCore.
- Source: classes/ObjectModel.php line 895
- $die boolean
- $error_return boolean
boolean|string ObjectModelCore::validateFieldsLang(boolean $die, boolean $error_return)
Checks if multilingual object field values are valid before database interaction.
- Visibility: public
- This method is defined by ObjectModelCore.
- Source: classes/ObjectModel.php line 927
- $die boolean
- $error_return boolean
array ObjectModelCore::validateFieldsRequiredDatabase(boolean $htmlentities)
Validate required fields.
- Visibility: public
- This method is defined by ObjectModelCore.
- Source: classes/ObjectModel.php line 1322
- $htmlentities boolean