I need to get the actual "general record storage page id". I found the following snipplet but the variable is empty even though the storagePid is set on the page.
$config = $this->configurationManager->getConfiguration(Tx_Extbase_Configuration_ConfigurationManagerInterface::CONFIGURATION_TYPE_FRAMEWORK);
var_dump($config['persistence']['storagePid']);
Any help would be appreciated
I'm not quite sure, what are you trying to get. Snippet you provided gets without problems the storagePid set in constants for your extension, the same as this code from setup.txt
:
plugin.tx_yourext {
persistence {
storagePid = {$plugin.tx_yourext.persistence.storagePid}
}
}
if you have problems with getting your storagePid with provided snippet also can modify your setup.txt
and make sure that the value will be also propagated into settings
scope:
plugin.tx_yourext {
persistence {
storagePid = {$plugin.tx_yourext.persistence.storagePid}
}
settings {
storagePid = {$plugin.tx_yourext.persistence.storagePid}
}
}
then in your controller you can catch it with simpler code:
$myStoragePid = $this->settings['storagePid'];
if it will not work for you that means, you didn't set proper value in Constants
for YourExt and/or didn't cleared the caches in the BE.
BTW: Maybe if you'll be more specific I could send better answer.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With