TemplateConfigService

This service class contains functions related to template configuration functionality.
All public functions are available in the Twig template renderer.

Namespace

IO\Services

Properties
Type Name Description

``

$configRepository

``

$templatePluginName

Methods
public __construct($configRepository)

TemplateConfigService constructor.

Parameters

Type

Name

Description

ConfigRepository

$configRepository

public get($key, $default = null):mixed

Get a config value by it's key

Parameters

Type

Name

Description

string

$key

Key of the config value

mixed

$default

Optional: A default to be returned, if no value for given key is set (Default: null)

public getBoolean($key, $default = false):bool

Get a config value by it's key as a boolean

Parameters

Type

Name

Description

string

$key

Key of the config value

bool

$default

Optional: A default to be returned, if no value for given key is set (Default: false)

public getInteger($key, $default):int

Get a config value by it's key as an integer

Parameters

Type

Name

Description

string

$key

Key of the config value

int

$default

Optional: A default to be returned, if no value for given key is set (Default: 0)