Properties

$id

$id : 

Type

$name

$name : string

Type

string — Key

$id_shop_group

$id_shop_group : 

Type

$id_shop

$id_shop : 

Type

$value

$value : string

Type

string — Value

$date_add

$date_add : string

Type

string — Object creation date

$date_upd

$date_upd : string

Type

string — Object last modification date

$definition

$definition : 

Type

$_cache

$_cache : array

Type

array — Configuration cache

$types

$types : array

Type

array — Vars types

$webserviceParameters

$webserviceParameters : 

Type

Methods

getFieldsLang()

getFieldsLang() : array

Returns

array —

Multilingual fields

getIdByName()

getIdByName(string  $key, integer  $id_shop_group = null, integer  $id_shop = null) 

Return ID a configuration key

Parameters

string $key
integer $id_shop_group
integer $id_shop

configurationIsLoaded()

configurationIsLoaded() 

loadConfiguration()

loadConfiguration() 

Load all configuration data

get()

get(string  $key, integer  $id_lang = null,   $id_shop_group = null,   $id_shop = null) : string

Get a single configuration value (in one language only)

Parameters

string $key

Key wanted

integer $id_lang

Language ID

$id_shop_group
$id_shop

Returns

string —

Value

getGlobalValue()

getGlobalValue(  $key,   $id_lang = null) 

Parameters

$key
$id_lang

getInt()

getInt(string  $key, integer  $id_shop_group = null, integer  $id_shop = null) : array

Get a single configuration value (in multiple languages)

Parameters

string $key

Key wanted

integer $id_shop_group
integer $id_shop

Returns

array —

Values in multiple languages

getMultiShopValues()

getMultiShopValues(string  $key, integer  $id_lang = null) : array

Get a single configuration value for all shops

Parameters

string $key

Key wanted

integer $id_lang

Returns

array —

Values for all shops

getMultiple()

getMultiple(array  $keys, integer  $id_lang = null,   $id_shop_group = null,   $id_shop = null) : array

Get several configuration values (in one language only)

Parameters

array $keys

Keys wanted

integer $id_lang

Language ID

$id_shop_group
$id_shop

Returns

array —

Values

hasKey()

hasKey(string  $key, integer  $id_lang = null, integer  $id_shop_group = null, integer  $id_shop = null) : boolean

Check if key exists in configuration

Parameters

string $key
integer $id_lang
integer $id_shop_group
integer $id_shop

Returns

boolean

set()

set(string  $key, mixed  $values, integer  $id_shop_group = null, integer  $id_shop = null) 

Set TEMPORARY a single configuration value (in one language only)

Parameters

string $key

Key wanted

mixed $values

$values is an array if the configuration is multilingual, a single string else.

integer $id_shop_group
integer $id_shop

updateGlobalValue()

updateGlobalValue(string  $key, mixed  $values, boolean  $html = false) : boolean

Update configuration key for global context only

Parameters

string $key
mixed $values
boolean $html

Returns

boolean

updateValue()

updateValue(string  $key, mixed  $values, boolean  $html = false, integer  $id_shop_group = null, integer  $id_shop = null) : boolean

Update configuration key and value into database (automatically insert if key does not exist)

Parameters

string $key

Key

mixed $values

$values is an array if the configuration is multilingual, a single string else.

boolean $html

Specify if html is authorized in value

integer $id_shop_group
integer $id_shop

Returns

boolean —

Update result

deleteByName()

deleteByName(string  $key) : boolean

Delete a configuration key in database (with or without language management)

Parameters

string $key

Key to delete

Returns

boolean —

Deletion result

deleteFromContext()

deleteFromContext(string  $key) 

Delete configuration key from current context.

Parameters

string $key

hasContext()

hasContext(string  $key, integer  $id_lang, integer  $context) 

Check if configuration var is defined in given context

Parameters

string $key
integer $id_lang
integer $context

isOverridenByCurrentContext()

isOverridenByCurrentContext(  $key) 

Parameters

$key

isLangKey()

isLangKey(string  $key) : boolean

Check if a key was loaded as multi lang

Parameters

string $key

Returns

boolean

getWebserviceObjectList()

getWebserviceObjectList(  $sql_join,   $sql_filter,   $sql_sort,   $sql_limit) : array

This method is override to allow TranslatedConfiguration entity

Parameters

$sql_join
$sql_filter
$sql_sort
$sql_limit

Returns

array

sqlRestriction()

sqlRestriction(integer  $id_shop_group, integer  $id_shop) : string

Add SQL restriction on shops for configuration table

Parameters

integer $id_shop_group
integer $id_shop

Returns

string