Created
August 13, 2014 12:45
-
-
Save s2b/6b2df1dfbb398e8203ce to your computer and use it in GitHub Desktop.
TYPO3/ExtBase: Get upload path from TCA
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
class SomeClass{ | |
protected function getUploadPath($table, $field) { | |
global $TCA; | |
$cObj = $this->configurationManager->getContentObject(); | |
t3lib_div::loadTCA($table); | |
return $cObj->typoLink_URL(array( | |
'parameter' => trim($TCA[$table]['columns'][$field]['config']['uploadfolder'], '/') . '/' | |
)); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
In a pre-FAL situation I use this snippet to get the upload path of a file from the TCA record of the table.