typo3-realurl
typo3-realurl copied to clipboard
[FEATURE] Method/Hook for config on (other)extension installation
@dmitry this is just a question/discussion
In https://github.com/dmitryd/typo3-realurl/issues/381 I reported a (false positive) issue in realurl, where you explaind the concept. This led to a change in the affected extension.
During review we had some more discussions about the inserting of configs during extension installation. This would it make easier to include a extension specific realurl-configuration, when an extension ist installed after realurl. You can find the discussion here https://github.com/mindshape-GmbH/mindshape_seo/commit/07a66d45d181d5b90b299de06166814dff4d868f#commitcomment-20713183
The question is now: Wouldn't it make sense to have a function in realurl, which allows an extension to send a config, which is then added properly. The advantages would be:
- only realurl handles it's config
- basic realurl settings are automatically included if realurl has been installed previous installation of the extension
- no manual changes to the config necessary in most cases
- consistent config regardless if menual or automatic config selected.
- config file can always be up to date
Implementation (bear with me I lack some experience) could be by calling a function like
addConfigFromExtension
with the default configuration for this extension.
What's your opinion to this?
/cc @dmitryd
@dmitry sorry.
Yes, this is a good idea! I am going to review & add that. Thanks for suggestion!
What about using this hook?
@dmitryd as I said already upfront, I am not the specialist, so bear with me please if I am wrong.
As I can see the added postProcessConfiguration
function is a hook to call beack the the added extension and passes all params with it. This shall then process the add the params itself. Is this correct?
Lets start with this before I go into it further.
Please, try & investigate if the hook works for you. It is needed by you, so you are expected to invest some time in it too :)