diff --git a/typo3/sysext/core/Documentation/Changelog/9.0/Feature-82999-AddAHookToHideCredentialsInTheConfigurationModule.rst b/typo3/sysext/core/Documentation/Changelog/9.0/Feature-82999-AddAHookToHideCredentialsInTheConfigurationModule.rst index b90ef006a15c5ea929cdf48eda952d3a78d9a4b5..0c237155d766b297c3de14e552a6e2437bd2c8cd 100644 --- a/typo3/sysext/core/Documentation/Changelog/9.0/Feature-82999-AddAHookToHideCredentialsInTheConfigurationModule.rst +++ b/typo3/sysext/core/Documentation/Changelog/9.0/Feature-82999-AddAHookToHideCredentialsInTheConfigurationModule.rst @@ -11,8 +11,35 @@ Description To blind additional configuration options in the Configuration module a hook has been added: -:php:`$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS'][\TYPO3\CMS\Lowlevel\ControllerConfigurationController::class]['modifyBlindedConfigurationOptions']` +:php:`$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS'][\TYPO3\CMS\Lowlevel\Controller\ConfigurationController::class]['modifyBlindedConfigurationOptions']` +This can be implemented e.g. by adding a class :php:`\MyVendor\MyExtension\Hook\BlindedConfigurationOptionsHook`: + +.. code-block:: php + + 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; + } + } + +and adding the following line to ext_localconf.php: + +.. code-block:: php + + $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS'][\TYPO3\CMS\Lowlevel\Controller\ConfigurationController::class]['modifyBlindedConfigurationOptions'][] = \MyVendor\MyExtension\Hook\BlindedConfigurationOptionsHook::class; Impact ======