[TYPO3-mvc] Override plugin settings in TypoScript

Kai kai.tallafus at gmx.at
Mon May 28 11:48:36 CEST 2012


Hello list,

I want to use a plugin of another extension in my own extension. Basically this is no problem by defining a "typoscript widget":

plugin.tx_myext.widgets.checkoutUserRegister = USER_INT
plugin.tx_myext.widgets.checkoutUserRegister {
  userFunc = tx_extbase_core_bootstrap->run
  pluginName = FeuserCreate
  extensionName = SfRegister
  controller = FeuserCreate

  settings < plugin.tx_sfregister.settings
  persistence < plugin.tx_sfregister.persistence
  view < plugin.tx_sfregister.view
  mvc < plugin.tx_sfregister.mvc
  
  persistence {
    storagePid = {$plugin.tx_myext.settings.userStoragePid}
  }

  view {
    templateRootPath = {$plugin.tx_myext.settings.sf_register.templateRootPath}
    partialRootPath = {$plugin.tx_myext.settings.sf_register.partialRootPath}
    layoutRootPath = {$plugin.tx_myext.settings.sf_register.layoutRootPath}
  }

}

Now comes the problem:

For sf_register extension, you can configure the validators for each field within the settings array:
plugin.tx_sfregister.settings.validation.create {
	username = ....
	password = ...
}

Since I don´t need all the fields of the original sf_register extension, I want to delete the original validation and set my own locally:
plugin.tx_myext.widgets.checkoutUserRegister.settings.validation.create >
plugin.tx_myext.widgets.checkoutUserRegister.settings.validation.create {
	....
}

But this does not work. As far as I understand the Extbase ConfigurationManager, this is caused by the Tx_Extbase_Configuration_FrontendConfigurationManager::getPluginConfiguration() method, which allways merges the local settings (of the widget) with the global configuration found in plugin.tx_sfregister

So it seems it is not possible to locally remove settings whichs are defined in the global plugin settings.

Is this correct? Am I missing something? Bug or feature? ;-)

Thanks & greetings
Kai


More information about the TYPO3-project-typo3v4mvc mailing list