new hooks processConfig and showConfig

hook 'showConfig' is anly called for extension variables if the type is
set to 'hook'. 'processConfig' is called after the extension
configuration is read
This commit is contained in:
Uwe Steinmann 2019-10-23 09:06:19 +02:00
parent 40dee4b9d2
commit 75f3afdc84

View File

@ -474,6 +474,8 @@ $this->showStartPaneContent('site', (!$currenttab || $currenttab == 'site'));
-->
<?php
foreach($GLOBALS['EXT_CONF'] as $extname=>$extconf) {
if($this->hasHook('processConfig'))
$extconf = $this->callHook('processConfig', $extname, $extconf);
if($extconf['config']) {
$this->showRawConfigHeadline("<a name=\"".$extname."\"></a>".$extconf['title']);
foreach($extconf['config'] as $confkey=>$conf) {
@ -565,6 +567,9 @@ $this->showStartPaneContent('site', (!$currenttab || $currenttab == 'site'));
}
}
break;
case 'hook':
echo $this->callHook('showConfig', $confkey, $extname, $extconf);
break;
default:
$this->showTextField("extensions[".$extname."][".$confkey."]", isset($settings->_extensions[$extname][$confkey]) ? $settings->_extensions[$extname][$confkey] : '', isset($conf['type']) ? $conf['type'] : '', isset($conf['placeholder']) ? $conf['placeholder'] : '');
}