[TYPO3-dev] TCA userFunc: get Partials path

Mark Howells-Mead m.howells-mead at frappant.ch
Tue Sep 30 18:20:57 CEST 2014


Evenin’ all!

I’m using ‘userFunc' in my TCA to create a custom backend field. The field will be a simple select element containing a list of Fluid templates in the extension’s ‘Partials’ folder. (This is for a custom feature, not as a workaround to the usual Action-Fluid logic.)

Is there a way to get the path to the Partials folder, aside from hard-coding it using \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::extPath()? (Ikk.)

The userFunc in ext_tables.php calls MyCompany\\ExtensionName\\Userfunctions\\Tca->render and in the render function, I need to get the folder path so that I can run a RecursiveDirectoryIterator on it in PHP to get a list of Fluid templates.

The function render receives $PA and $fObj as parameters, but these don’t contain the information I need.

If not, then is the current extension key stored anywhere in $GLOBALS at this moment, so that I can at least use the key dynamically in the call to \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::extPath() ?

Any help gratefully received!




More information about the TYPO3-dev mailing list