- Class name: TranslatedConfigurationCore
- Parent class: Configuration
- Source: classes/TranslatedConfiguration.php line 27
- $definition
- $webserviceParameters
- $_CONF
- $date_add
- $date_upd
- $id
- $id_shop
- $id_shop_group
- $name
- $types
- $value
- $db
- $def
- $fieldsRequired
- $fieldsRequiredDatabase
- $fieldsRequiredLang
- $fieldsSize
- $fieldsSizeLang
- $fieldsValidate
- $fieldsValidateLang
- $get_shop_from_context
- $id_lang
- $id_shop_list
- $identifier
- $image_dir
- $image_format
- $table
- $tables
- $update_fields
- __construct
- add
- addFieldsRequiredDatabase
- associateTo
- clearCache
- delete
- deleteByName
- deleteFromContext
- deleteImage
- deleteSelection
- displayFieldName
- duplicateObject
- duplicateShops
- existsInDatabase
- formatFields
- formatValue
- get
- getAssociatedShops
- getDefinition
- getFieldByLang
- getFields
- getFieldsLang
- getFieldsRequiredDatabase
- getFieldsShop
- getGlobalValue
- getIdByName
- getInt
- getMultiple
- getTranslationsFields
- getValidationRules
- getWebserviceObjectList
- getWebserviceParameters
- hasContext
- hasKey
- hasMultishopEntries
- hydrate
- hydrateCollection
- isAssociatedToShop
- isCurrentlyUsed
- isLangKey
- isLangMultishop
- isMultishop
- isOverridenByCurrentContext
- loadConfiguration
- makeTranslationFields
- save
- set
- setDefinitionRetrocompatibility
- setFieldsToUpdate
- sqlRestriction
- toggleStatus
- update
- updateGlobalValue
- updateMultishopTable
- updateValue
- validateControler
- validateController
- validateField
- validateFields
- validateFieldsLang
- validateFieldsRequiredDatabase
public mixed $definition = array('table' => 'configuration', 'primary' => 'id_configuration', 'multilang' => true, 'fields' => array('name' => array('type' => self::TYPE_STRING, 'validate' => 'isConfigName', 'required' => true, 'size' => 32), 'id_shop_group' => array('type' => self::TYPE_NOTHING, 'validate' => 'isUnsignedId'), 'id_shop' => array('type' => self::TYPE_NOTHING, 'validate' => 'isUnsignedId'), 'value' => array('type' => self::TYPE_STRING, 'lang' => true), 'date_add' => array('type' => self::TYPE_DATE, 'validate' => 'isDate'), 'date_upd' => array('type' => self::TYPE_DATE, 'validate' => 'isDate')))
- Visibility: public
- This property is static.
- Source: classes/TranslatedConfiguration.php line 39.
protected mixed $webserviceParameters = array('objectNodeName' => 'translated_configuration', 'objectsNodeName' => 'translated_configurations', 'fields' => array('value' => array(), 'date_add' => array(), 'date_upd' => array()))
- Visibility: protected
- Source: classes/TranslatedConfiguration.php line 29.
protected array $_CONF
- Visibility: protected
- This property is static.
- This property is defined by ConfigurationCore.
- Source: classes/Configuration.php line 64.
public string $date_add
- Visibility: public
- This property is defined by ConfigurationCore.
- Source: classes/Configuration.php line 41.
public string $date_upd
- Visibility: public
- This property is defined by ConfigurationCore.
- Source: classes/Configuration.php line 44.
public mixed $id
- Visibility: public
- This property is defined by ConfigurationCore.
- Source: classes/Configuration.php line 29.
public mixed $id_shop
- Visibility: public
- This property is defined by ConfigurationCore.
- Source: classes/Configuration.php line 35.
public mixed $id_shop_group
- Visibility: public
- This property is defined by ConfigurationCore.
- Source: classes/Configuration.php line 34.
public string $name
- Visibility: public
- This property is defined by ConfigurationCore.
- Source: classes/Configuration.php line 32.
protected array $types = array()
- Visibility: protected
- This property is static.
- This property is defined by ConfigurationCore.
- Source: classes/Configuration.php line 67.
public string $value
- Visibility: public
- This property is defined by ConfigurationCore.
- Source: classes/Configuration.php line 38.
protected \Db $db = false
- Visibility: protected
- This property is static.
- This property is defined by ObjectModelCore.
- Source: classes/ObjectModel.php line 140.
protected array $def
- Visibility: protected
- This property is defined by ObjectModelCore.
- Source: classes/ObjectModel.php line 130.
protected mixed $fieldsRequired = array()
- Visibility: protected
- This property is defined by ObjectModelCore.
- Source: classes/ObjectModel.php line 80.
protected mixed $fieldsRequiredDatabase = null
- Visibility: protected
- This property is static.
- This property is defined by ObjectModelCore.
- Source: classes/ObjectModel.php line 65.
protected mixed $fieldsRequiredLang = array()
- Visibility: protected
- This property is defined by ObjectModelCore.
- Source: classes/ObjectModel.php line 95.
protected mixed $fieldsSize = array()
- Visibility: protected
- This property is defined by ObjectModelCore.
- Source: classes/ObjectModel.php line 85.
protected mixed $fieldsSizeLang = array()
- Visibility: protected
- This property is defined by ObjectModelCore.
- Source: classes/ObjectModel.php line 100.
protected mixed $fieldsValidate = array()
- Visibility: protected
- This property is defined by ObjectModelCore.
- Source: classes/ObjectModel.php line 90.
protected mixed $fieldsValidateLang = array()
- Visibility: protected
- This property is defined by ObjectModelCore.
- Source: classes/ObjectModel.php line 105.
protected mixed $get_shop_from_context = true
- Visibility: protected
- This property is defined by ObjectModelCore.
- Source: classes/ObjectModel.php line 63.
protected integer $id_lang = null
- Visibility: protected
- This property is defined by ObjectModelCore.
- Source: classes/ObjectModel.php line 57.
public mixed $id_shop_list = null
- Visibility: public
- This property is defined by ObjectModelCore.
- Source: classes/ObjectModel.php line 61.
protected mixed $identifier
- Visibility: protected
- This property is defined by ObjectModelCore.
- Source: classes/ObjectModel.php line 75.
protected string $image_dir = null
- Visibility: protected
- This property is defined by ObjectModelCore.
- Source: classes/ObjectModel.php line 116.
protected string $image_format = 'jpg'
- Visibility: protected
- This property is defined by ObjectModelCore.
- Source: classes/ObjectModel.php line 119.
protected mixed $table
- Visibility: protected
- This property is defined by ObjectModelCore.
- Source: classes/ObjectModel.php line 70.
protected mixed $tables = array()
- Visibility: protected
- This property is defined by ObjectModelCore.
- Source: classes/ObjectModel.php line 110.
protected array $update_fields = null
- Visibility: protected
- This property is defined by ObjectModelCore.
- Source: classes/ObjectModel.php line 135.
mixed TranslatedConfigurationCore::__construct($id, $id_lang)
- Visibility: public
- Source: classes/TranslatedConfiguration.php line 53
- $id mixed
- $id_lang mixed
mixed TranslatedConfigurationCore::add($autodate, $nullValues)
- Visibility: public
- Source: classes/TranslatedConfiguration.php line 72
- $autodate mixed
- $nullValues mixed
mixed ObjectModelCore::addFieldsRequiredDatabase($fields)
- Visibility: public
- This method is defined by ObjectModelCore.
- Source: classes/ObjectModel.php line 1144
- $fields mixed
boolean 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 1191
- $id_shops integer|array
mixed ObjectModelCore::clearCache($all)
- Visibility: public
- This method is defined by ObjectModelCore.
- Source: classes/ObjectModel.php line 1158
- $all mixed
boolean ObjectModelCore::delete()
Delete current object from database
- Visibility: public
- This method is defined by ObjectModelCore.
- Source: classes/ObjectModel.php line 691
boolean ConfigurationCore::deleteByName(string $key)
Delete a configuration key in database (with or without language management)
- Visibility: public
- This method is static.
- This method is defined by ConfigurationCore.
- Source: classes/Configuration.php line 384
- $key string - Key to delete
mixed ConfigurationCore::deleteFromContext(string $key)
Delete configuration key from current context.
- Visibility: public
- This method is static.
- This method is defined by ConfigurationCore.
- Source: classes/Configuration.php line 411
- $key string
boolean ObjectModelCore::deleteImage($force_delete)
Delete images associated with the object
- Visibility: public
- This method is defined by ObjectModelCore.
- Source: classes/ObjectModel.php line 1317
- $force_delete mixed
boolean ObjectModelCore::deleteSelection(array $selection)
Delete several objects from database
- Visibility: public
- This method is defined by ObjectModelCore.
- Source: classes/ObjectModel.php line 737
- $selection array
mixed ObjectModelCore::displayFieldName($field, $class, $htmlentities, \Context $context)
- Visibility: public
- This method is static.
- This method is defined by ObjectModelCore.
- Source: classes/ObjectModel.php line 937
- $field mixed
- $class mixed
- $htmlentities mixed
- $context Context
\new ObjectModelCore::duplicateObject()
Duplicate current object to database
- Visibility: public
- This method is defined by ObjectModelCore.
- Source: classes/ObjectModel.php line 527
mixed ObjectModelCore::duplicateShops($id)
- Visibility: public
- This method is defined by ObjectModelCore.
- Source: classes/ObjectModel.php line 1235
- $id mixed
boolean ObjectModelCore::existsInDatabase(integer $id_entity, string $table)
Specify if an ObjectModel is already in database
- Visibility: public
- This method is static.
- This method is defined by ObjectModelCore.
- Source: classes/ObjectModel.php line 1354
- $id_entity integer
- $table string
array ObjectModelCore::formatFields(integer $type, integer $id_lang)
- Visibility: protected
- This method is defined by ObjectModelCore.
- Source: classes/ObjectModel.php line 334
- $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, $with_quotes)
Format a data
- Visibility: public
- This method is static.
- This method is defined by ObjectModelCore.
- Source: classes/ObjectModel.php line 380
- $value mixed
- $type integer
- $with_quotes mixed
string ConfigurationCore::get(string $key, integer $id_lang, $id_shop_group, $id_shop)
Get a single configuration value (in one language only)
- Visibility: public
- This method is static.
- This method is defined by ConfigurationCore.
- Source: classes/Configuration.php line 146
- $key string - Key wanted
- $id_lang integer - Language ID
- $id_shop_group mixed
- $id_shop mixed
array ObjectModelCore::getAssociatedShops()
Get the list of associated id_shop
- Visibility: public
- This method is defined by ObjectModelCore.
- Source: classes/ObjectModel.php line 1220
array ObjectModelCore::getDefinition(string $class, string $field)
Get object definition
- Visibility: public
- This method is static.
- This method is defined by ObjectModelCore.
- Source: classes/ObjectModel.php line 1460
- $class string - Name of object
- $field string - Name of field if we want the definition of one field only
mixed ObjectModelCore::getFieldByLang($field_name, 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 1548
- $field_name mixed
- $id_lang 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 262
array ConfigurationCore::getFieldsLang()
- Visibility: public
- This method is defined by ConfigurationCore.
- Source: classes/Configuration.php line 79
mixed ObjectModelCore::getFieldsRequiredDatabase($all)
- Visibility: public
- This method is defined by ObjectModelCore.
- Source: classes/ObjectModel.php line 1136
- $all mixed
array ObjectModelCore::getFieldsShop()
Prepare fields for multishop Fields are not validated here, we considere they are already validated in getFields() method, this 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 285
mixed ConfigurationCore::getGlobalValue($key, $id_lang)
- Visibility: public
- This method is static.
- This method is defined by ConfigurationCore.
- Source: classes/Configuration.php line 173
- $key mixed
- $id_lang mixed
mixed ConfigurationCore::getIdByName(string $key, integer $id_shop_group, integer $id_shop)
Return ID a configuration key
- Visibility: public
- This method is static.
- This method is defined by ConfigurationCore.
- Source: classes/Configuration.php line 93
- $key string
- $id_shop_group integer
- $id_shop integer
array ConfigurationCore::getInt(string $key, integer $id_shop_group, integer $id_shop)
Get a single configuration value (in multiple languages)
- Visibility: public
- This method is static.
- This method is defined by ConfigurationCore.
- Source: classes/Configuration.php line 186
- $key string - Key wanted
- $id_shop_group integer
- $id_shop integer
array ConfigurationCore::getMultiple(array $keys, integer $id_lang, $id_shop_group, $id_shop)
Get several configuration values (in one language only)
- Visibility: public
- This method is static.
- This method is defined by ConfigurationCore.
- Source: classes/Configuration.php line 202
- $keys array - Keys wanted
- $id_lang integer - Language ID
- $id_shop_group mixed
- $id_shop mixed
mixed ObjectModelCore::getTranslationsFields($fields_array)
- Visibility: protected
- This method is defined by ObjectModelCore.
- Source: classes/ObjectModel.php line 769
- $fields_array mixed
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 148
- $class string - Child class name for static use (optional)
mixed TranslatedConfigurationCore::getWebserviceObjectList($sql_join, $sql_filter, $sql_sort, $sql_limit)
- Visibility: public
- Source: classes/TranslatedConfiguration.php line 100
- $sql_join mixed
- $sql_filter mixed
- $sql_sort mixed
- $sql_limit mixed
mixed ObjectModelCore::getWebserviceParameters($ws_params_attribute_name)
- Visibility: public
- This method is defined by ObjectModelCore.
- Source: classes/ObjectModel.php line 1004
- $ws_params_attribute_name mixed
mixed ConfigurationCore::hasContext(string $key, integer $id_lang, integer $context)
Check if configuration var is defined in given context
- Visibility: public
- This method is static.
- This method is defined by ConfigurationCore.
- Source: classes/Configuration.php line 439
- $key string
- $id_lang integer
- $context integer
boolean ConfigurationCore::hasKey(string $key, integer $id_lang, integer $id_shop_group, integer $id_shop)
Check if key exists in configuration
- Visibility: public
- This method is static.
- This method is defined by ConfigurationCore.
- Source: classes/Configuration.php line 228
- $key string
- $id_lang integer
- $id_shop_group integer
- $id_shop integer
boolean ObjectModelCore::hasMultishopEntries()
Check if there is more than one entries in associated shop table for current entity
- Visibility: public
- This method is defined by ObjectModelCore.
- Source: classes/ObjectModel.php line 1260
mixed ObjectModelCore::hydrate(array $data, integer $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 1392
- $data array
- $id_lang integer
array ObjectModelCore::hydrateCollection(string $class, array $datas, integer $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 1411
- $class string - Class of objects to hydrate
- $datas array - List of data (multi-dimensional array)
- $id_lang integer
boolean ObjectModelCore::isAssociatedToShop(integer $id_shop)
Check if current object is associated to a shop
- Visibility: public
- This method is defined by ObjectModelCore.
- Source: classes/ObjectModel.php line 1173
- $id_shop integer
boolean ObjectModelCore::isCurrentlyUsed(string $table, boolean $has_active_column)
This method is allow to know if a entity is currently used
- Visibility: public
- This method is static.
- This method is defined by ObjectModelCore.
- Source: classes/ObjectModel.php line 1372
- $table string - name of table linked to entity
- $has_active_column boolean - true if the table has an active column
boolean ConfigurationCore::isLangKey(string $key)
Check if a key was loaded as multi lang
- Visibility: public
- This method is static.
- This method is defined by ConfigurationCore.
- Source: classes/Configuration.php line 488
- $key string
mixed ObjectModelCore::isLangMultishop()
- Visibility: public
- This method is defined by ObjectModelCore.
- Source: classes/ObjectModel.php line 1272
mixed ObjectModelCore::isMultishop()
- Visibility: public
- This method is defined by ObjectModelCore.
- Source: classes/ObjectModel.php line 1267
mixed ConfigurationCore::isOverridenByCurrentContext($key)
- Visibility: public
- This method is static.
- This method is defined by ConfigurationCore.
- Source: classes/Configuration.php line 463
- $key mixed
mixed ConfigurationCore::loadConfiguration()
Load all configuration data
- Visibility: public
- This method is static.
- This method is defined by ConfigurationCore.
- Source: classes/Configuration.php line 110
mixed ObjectModelCore::makeTranslationFields($fields, $fields_array, $id_language)
- Visibility: protected
- This method is defined by ObjectModelCore.
- Source: classes/ObjectModel.php line 785
- $fields mixed
- $fields_array mixed
- $id_language mixed
boolean ObjectModelCore::save(boolean $null_values, boolean $autodate)
Save current object to database (add or update)
- Visibility: public
- This method is defined by ObjectModelCore.
- Source: classes/ObjectModel.php line 424
- $null_values boolean
- $autodate boolean
mixed ConfigurationCore::set(string $key, mixed $values, integer $id_shop_group, integer $id_shop)
Set TEMPORARY a single configuration value (in one language only)
- Visibility: public
- This method is static.
- This method is defined by ConfigurationCore.
- Source: classes/Configuration.php line 246
- $key string - Key wanted
- $values mixed - $values is an array if the configuration is multilingual, a single string else.
- $id_shop_group integer
- $id_shop integer
mixed ObjectModelCore::setDefinitionRetrocompatibility()
Retrocompatibility for classes without $definition static Remove this in 1.6 !
- Visibility: protected
- This method is defined by ObjectModelCore.
- Source: classes/ObjectModel.php line 1488
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 1574
- $fields array
string ConfigurationCore::sqlRestriction(integer $id_shop_group, integer $id_shop)
Add SQL restriction on shops for configuration table
- Visibility: protected
- This method is static.
- This method is defined by ConfigurationCore.
- Source: classes/Configuration.php line 500
- $id_shop_group integer
- $id_shop integer
boolean ObjectModelCore::toggleStatus()
Toggle object status in database
- Visibility: public
- This method is defined by ObjectModelCore.
- Source: classes/ObjectModel.php line 753
mixed TranslatedConfigurationCore::update($nullValues)
- Visibility: public
- Source: classes/TranslatedConfiguration.php line 77
- $nullValues mixed
boolean ConfigurationCore::updateGlobalValue(string $key, mixed $values, boolean $html)
Update configuration key for global context only
- Visibility: public
- This method is static.
- This method is defined by ConfigurationCore.
- Source: classes/Configuration.php line 278
- $key string
- $values mixed
- $html boolean
boolean ObjectModelCore::updateMultishopTable(string $classname, array $data, string $where, string $specific_where)
Update 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 1287
- $classname string
- $data array
- $where string
- $specific_where string - Only executed for common table
boolean ConfigurationCore::updateValue(string $key, mixed $values, boolean $html, integer $id_shop_group, integer $id_shop)
Update configuration key and value into database (automatically insert if key does not exist)
- Visibility: public
- This method is static.
- This method is defined by ConfigurationCore.
- Source: classes/Configuration.php line 293
- $key string - Key
- $values mixed - $values is an array if the configuration is multilingual, a single string else.
- $html boolean - Specify if html is authorized in value
- $id_shop_group integer
- $id_shop integer
mixed ObjectModelCore::validateControler($htmlentities)
TODO: refactor rename all calls to this to validateController
- Visibility: public
- This method is defined by ObjectModelCore.
- Source: classes/ObjectModel.php line 952
- $htmlentities mixed
mixed ObjectModelCore::validateController($htmlentities)
- Visibility: public
- This method is defined by ObjectModelCore.
- Source: classes/ObjectModel.php line 958
- $htmlentities mixed
boolean|string ObjectModelCore::validateField(string $field, mixed $value, integer $id_lang)
Validate a single field
- Visibility: public
- This method is defined by ObjectModelCore.
- Source: classes/ObjectModel.php line 890
- $field string - Field name
- $value mixed - Field value
- $id_lang integer
boolean|string ObjectModelCore::validateFields(boolean $die, boolean $error_return)
Check for fields validity before database interaction
- Visibility: public
- This method is defined by ObjectModelCore.
- Source: classes/ObjectModel.php line 823
- $die boolean
- $error_return boolean
boolean|string ObjectModelCore::validateFieldsLang(boolean $die, boolean $error_return)
Check for multilingual fields validity before database interaction
- Visibility: public
- This method is defined by ObjectModelCore.
- Source: classes/ObjectModel.php line 852
- $die boolean
- $error_return boolean
mixed ObjectModelCore::validateFieldsRequiredDatabase($htmlentities)
- Visibility: public
- This method is defined by ObjectModelCore.
- Source: classes/ObjectModel.php line 1114
- $htmlentities mixed