mirror of
https://github.com/phpbb/phpbb.git
synced 2025-02-24 03:54:10 +01:00
[feature/php-events] Fix docs and naming of core.build_config_template
PHPBB3-9550
This commit is contained in:
parent
a326dc10cf
commit
48a8482d23
@ -234,8 +234,7 @@ function h_radio($name, $input_ary, $input_default = false, $id = false, $key =
|
||||
*/
|
||||
function build_cfg_template($tpl_type, $key, &$new, $config_key, $vars)
|
||||
{
|
||||
global $user, $module;
|
||||
global $phpbb_dispatcher;
|
||||
global $user, $module, $phpbb_dispatcher;
|
||||
|
||||
$tpl = '';
|
||||
$name = 'config[' . $config_key . ']';
|
||||
@ -347,8 +346,23 @@ function build_cfg_template($tpl_type, $key, &$new, $config_key, $vars)
|
||||
$tpl .= $vars['append'];
|
||||
}
|
||||
|
||||
$vars = array('tpl_type', 'key', 'new', 'config_key', 'vars', 'tpl');
|
||||
extract($phpbb_dispatcher->trigger_event('core.build_cfg_template', compact($vars)));
|
||||
/**
|
||||
* Overwrite the html code we display for the config value
|
||||
*
|
||||
* @event core.build_config_template
|
||||
* @var array tpl_type Config type array:
|
||||
* 0 => data type
|
||||
* 1 [optional] => string: size, int: minimum
|
||||
* 2 [optional] => string: max. length, int: maximum
|
||||
* @var string key Should be used for the id attribute in html
|
||||
* @var array new Array with the config values we display
|
||||
* @var string name Should be used for the name attribute
|
||||
* @var array vars Array with the options for the config
|
||||
* @var string tpl The resulting html code we display
|
||||
* @since 3.1-A1
|
||||
*/
|
||||
$vars = array('tpl_type', 'key', 'new', 'name', 'vars', 'tpl');
|
||||
extract($phpbb_dispatcher->trigger_event('core.build_config_template', compact($vars)));
|
||||
|
||||
return $tpl;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user