ConfigurationWriter
in package
Class ConfigurationWriter
Table of Contents
- KEY_GROUP_CHECK = 'configuration/GROUP_CHECK'
- TABLE_LANG_NAME = 'gx_lang_configurations'
- TABLE_NAME = 'gx_configurations'
- $connection : Connection
- $eventDispatcher : EventDispatcherInterface
- __construct() : mixed
- ConfigurationWriter constructor.
- add() : void
- Adds a new configuration.
- addLanguageDependent() : void
- Adds a new language dependent database configuration value.
- delete() : void
- Deletes configurations by key name.
- update() : void
- Updates a configuration.
- updateLanguageDependent() : void
- Updates a language dependent database configuration value.
- exceptionToArray() : array<string|int, mixed>
- Converts an exception in an array.
- identifier() : array<string|int, mixed>
- Returns an identifier array that can be used by the connection to create a where condition.
- languageCodeToId() : string|null
- Converts the language code into a language id.
- updateConfiguration() : void
- Updates a configuration.
Constants
KEY_GROUP_CHECK
public
mixed
KEY_GROUP_CHECK
= 'configuration/GROUP_CHECK'
TABLE_LANG_NAME
private
mixed
TABLE_LANG_NAME
= 'gx_lang_configurations'
TABLE_NAME
private
mixed
TABLE_NAME
= 'gx_configurations'
Properties
$connection
private
Connection
$connection
$eventDispatcher
private
EventDispatcherInterface
$eventDispatcher
Methods
__construct()
ConfigurationWriter constructor.
public
__construct(Connection $connection, EventDispatcherInterface $eventDispatcher) : mixed
Parameters
- $connection : Connection
- $eventDispatcher : EventDispatcherInterface
Return values
mixed —add()
Adds a new configuration.
public
add(Configuration $item) : void
Parameters
- $item : Configuration
Return values
void —addLanguageDependent()
Adds a new language dependent database configuration value.
public
addLanguageDependent(LanguageDependentConfiguration $configuration) : void
Parameters
- $configuration : LanguageDependentConfiguration
Return values
void —delete()
Deletes configurations by key name.
public
delete(string ...$keys) : void
Parameters
- $keys : string
Return values
void —update()
Updates a configuration.
public
update(Configuration $item) : void
Parameters
- $item : Configuration
Return values
void —updateLanguageDependent()
Updates a language dependent database configuration value.
public
updateLanguageDependent(LanguageDependentConfiguration $configuration) : void
Parameters
- $configuration : LanguageDependentConfiguration
Return values
void —exceptionToArray()
Converts an exception in an array.
private
exceptionToArray(Exception $e) : array<string|int, mixed>
Parameters
- $e : Exception
Return values
array<string|int, mixed> —identifier()
Returns an identifier array that can be used by the connection to create a where condition.
private
identifier(string $key) : array<string|int, mixed>
(Format: ['key' => $key])
Parameters
- $key : string
Return values
array<string|int, mixed> —languageCodeToId()
Converts the language code into a language id.
private
languageCodeToId(string $languageCode) : string|null
Parameters
- $languageCode : string
Return values
string|null —updateConfiguration()
Updates a configuration.
private
updateConfiguration(Configuration $configuration) : void
Parameters
- $configuration : Configuration