wCMF 4.1
Guides
Getting started
Architecture
Model
Persistence
Presentation
Configuration
Security
I18n & l10n
Tests
Versions
4.1.x
4.0.x
API
Classes
Hierarchy
Code
Support
home
travis
build
iherwig
wcmf
src
wcmf
application
views
plugins
function.configvalue.php
1
<?php
2
/**
3
* wCMF - wemove Content Management Framework
4
* Copyright (C) 2005-2020 wemove digital solutions GmbH
5
*
6
* Licensed under the terms of the MIT License.
7
*
8
* See the LICENSE file distributed with this work for
9
* additional information.
10
*/
11
use
wcmf\lib\core\ObjectFactory
;
12
13
/**
14
* Output a configuration value.
15
*
16
* Example:
17
* @code
18
* {configvalue key="exportDir" section="cms"}
19
* @endcode
20
*
21
* @param $params Array with keys:
22
* - key: The key in the configuration section
23
* - section: The name of the configuration section
24
* @param $template Smarty_Internal_Template
25
* @return String
26
*/
27
function
smarty_function_configvalue(array $params, Smarty_Internal_Template $template) {
28
$config = ObjectFactory::getInstance(
'configuration'
);
29
echo $config->getValue($params[
'key'
], $params[
'section'
]);
30
}
31
?>
wcmf\lib\core\ObjectFactory
ObjectFactory implements the service locator pattern by wrapping a Factory instance and providing sta...
Definition:
ObjectFactory.php:24