Gude zusammen!
Ich bin nun seit schon über eine Stunde auf der Suche nach einem sehr API-nahem Weg, um die storagePid aus der Persistenz-Konfiguration einer Extbase-Extension ohne großen Code-Wulst zu überschreiben.
Ich möchte den StartingPoint bzw. die Angabe der storagePid/pages wie folgt aus dem Reiter "Behaviour" entfernen und dann im Plugin FlexForm anzeigen:
$GLOBALS['TCA']['tt_content']['types']['list']['subtypes_excludelist'][$pluginSignature] = 'pages, recursive';
<settings.startingpoint>
<TCEforms>
<exclude>1</exclude>
<label>LLL:EXT:lang/locallang_general.xml:LGL.startingpoint</label>
<config>
<type>group</type>
<internal_type>db</internal_type>
<allowed>pages</allowed>
<size>3</size>
<maxitems>50</maxitems>
<minitems>0</minitems>
<show_thumbs>1</show_thumbs>
<wizards>
<suggest>
<type>suggest</type>
</suggest>
</wizards>
</config>
</TCEforms>
</settings.startingpoint>
<settings.recursive>
<TCEforms>
<exclude>1</exclude>
<label>LLL:EXT:lang/locallang_general.xml:LGL.recursive</label>
<config>
<type>select</type>
<items type="array">
<numIndex index="1" type="array">
<numIndex index="0">LLL:EXT:cms/locallang_ttc.xml:recursive.I.0</numIndex>
<numIndex index="1">0</numIndex>
</numIndex>
<numIndex index="2" type="array">
<numIndex index="0">LLL:EXT:cms/locallang_ttc.xml:recursive.I.1</numIndex>
<numIndex index="1">1</numIndex>
</numIndex>
<numIndex index="3" type="array">
<numIndex index="0">LLL:EXT:cms/locallang_ttc.xml:recursive.I.2</numIndex>
<numIndex index="1">2</numIndex>
</numIndex>
<numIndex index="4" type="array">
<numIndex index="0">LLL:EXT:cms/locallang_ttc.xml:recursive.I.3</numIndex>
<numIndex index="1">3</numIndex>
</numIndex>
<numIndex index="5" type="array">
<numIndex index="0">LLL:EXT:cms/locallang_ttc.xml:recursive.I.4</numIndex>
<numIndex index="1">4</numIndex>
</numIndex>
<numIndex index="6" type="array">
<numIndex index="0">LLL:EXT:cms/locallang_ttc.xml:recursive.I.5</numIndex>
<numIndex index="1">250</numIndex>
</numIndex>
</items>
</config>
</TCEforms>
</settings.recursive>
Ich entdeckte bereits in der Klasse Tx_Extbase_Configuration_FrontendConfigurationManager die geschützte Methode overrideStoragePidIfStartingPointIsSet. Diese überschreibt den Wert in persistence.storagePid, wenn ein Startingpoint im Inhaltselement unter dem Reiter Behaviour gesetzt ist.
Kennt jemand eine Möglichkeit, um diesen Wert durch das FlexForm value hinter settings.startingpoint überschreiben zu können?
Mit
$this->configurationManager->getConfiguration(
Tx_Extbase_Configuration_ConfigurationManagerInterface::CONFIGURATION_TYPE_FRAMEWORK,
'extname',
'extname_pluginname'
)
komme ich problemlos an die vollstänfige Konfiguration des Plugin, weiß jedoch nicht - abgesehen von der offensichtlichen Methode this->configurationManager->setConfiguration - wie ich dem Königsweg der Ersetzung nahe komme.
Ideen?
Besten Dank im Voraus!