mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-28 06:08:52 +00:00
[feature/php-events] Fix docs and naming of core.build_config_template
PHPBB3-9550
This commit is contained in:
parent
a326dc10cf
commit
48a8482d23
1 changed files with 18 additions and 4 deletions
|
@ -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)
|
function build_cfg_template($tpl_type, $key, &$new, $config_key, $vars)
|
||||||
{
|
{
|
||||||
global $user, $module;
|
global $user, $module, $phpbb_dispatcher;
|
||||||
global $phpbb_dispatcher;
|
|
||||||
|
|
||||||
$tpl = '';
|
$tpl = '';
|
||||||
$name = 'config[' . $config_key . ']';
|
$name = 'config[' . $config_key . ']';
|
||||||
|
@ -347,8 +346,23 @@ function build_cfg_template($tpl_type, $key, &$new, $config_key, $vars)
|
||||||
$tpl .= $vars['append'];
|
$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;
|
return $tpl;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue