Feature: #82999 - Add a hook to hide credentials in the Configuration module

See forge#82999

Description

To blind additional configuration options in the Configuration module a hook has been added:

$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS'][\TYPO3\CMS\Lowlevel\Controller\ConfigurationController::class]['modifyBlindedConfigurationOptions']

This can be implemented e.g. by adding a class \MyVendor\MyExtension\Hook\BlindedConfigurationOptionsHook:

class BlindedConfigurationOptionsHook
{
    /**
     * Blind something in ConfigurationOptions
     *
     * @param array $blindedConfigurationOptions
     * @return array
     */
    public function modifyBlindedConfigurationOptions(array $blindedConfigurationOptions): array
    {
        if (!empty($GLOBALS['TYPO3_CONF_VARS']['EXTENSIONS']['example']['password'])) {
            $blindedConfigurationOptions['TYPO3_CONF_VARS']['EXTENSIONS']['example']['password'] = '******';
        }

        return $blindedConfigurationOptions;
    }
}
Copied!

and adding the following line to ext_localconf.php:

$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS'][\TYPO3\CMS\Lowlevel\Controller\ConfigurationController::class]['modifyBlindedConfigurationOptions'][] = \MyVendor\MyExtension\Hook\BlindedConfigurationOptionsHook::class;
Copied!

Impact

Extension developers can use this hook to e.g. hide custom credentials in the Configuration module.