Kernel::System::FrontendConfig

NAME

Kernel::System::FrontendConfig – Frontend config functions.

DESCRIPTION

All frontend configuration functions.

PUBLIC INTERFACE

has Frontend

Attribute that holds the current frontend.

BUILD()

Customization of object construction, do not use it directly.

ConfigGet()

Get frontend config.

    my %Result = $FrontendConfigObject->ConfigGet(
        Key => 'config_key', # (required) config key
    );

Result:

    %Result = (
        Frontend   => 'External',
        Key        => 'config_key',
        Value      => 'value',
        CreateTime => '2018-07-07 12:00:00',
        CreateBy   => 1,
        ChangeTime => '2018-07-07 12:00:00',
        ChangeBy   => 1,
    );

ConfigKeysGet()

Set frontend config.

    my @Keys = $FrontendConfigObject->ConfigKeysGet(
        Filter => 'HomePage', # (optional) All keys that starts with.
    );

Result:

    @Keys = (
        'HomePage::en',
        'HomePage::de',
        ...
    );

ConfigSet()

Set frontend config.

    my $Success = $FrontendConfigObject->ConfigSet(
        Key    => 'config_key', # (required) config key
        Value  => '',           # (required) Value
        UserID => 1,            # (required) UserID
    );

ConfigDelete()

Delete frontend config.

    my $Success = $FrontendConfigObject->ConfigDelete(
        Key => 'config_key', # (required) config key
    );

PRIVATE INTERFACE

_GetDatabaseTable()

Returns name of the database table for configuration storage based on the current frontend.

    # $Self->Frontend() = 'Agent';
    my $TableName = $Self->_GetDatabaseTable();
    $TableName = 'agent_frontend_config';
Scroll to Top