TYPO3 Extbase storagePid

I need to get the actual "shared record page id". I found the following snipplet, but the variable is empty even if the storePid file 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

+3
source share
1 answer

I'm not quite sure what you are trying to get. The fragment you install without problems stores the storePid value 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 getting your storePid with the provided fragment, you can also change yours setup.txtand make sure that the value will also be distributed in the area settings:

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 a simpler code:

$myStoragePid = $this->settings['storagePid'];

, , Constants YourExt / BE.

: , , .

+9

All Articles