Last active
January 21, 2017 08:16
-
-
Save Nimmermaer/0d8167c504752d9ce801890a615a4c68 to your computer and use it in GitHub Desktop.
This file contains 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
ext_tables.php | |
$GLOBALS['TCA']['tt_content']['ctrl']['label_userFunc'] = 'Vendor\MyExtension\UserFunc\LabelerTtContent->getRecordTitle'; | |
LabelerTTContent.php | |
namespace Vendor\MyExtension\UserFunc; | |
/** | |
* Class user_LabelerTtContent | |
* @ Michael Blunck | |
*/ | |
class LabelerTtContent { | |
/** | |
* get record title | |
* | |
* @return string | |
*/ | |
public static function getRecordTitle(&$parameters, $parentObject) { | |
if($parameters['row']['CType'] == 'list') { | |
$contentRecord = \TYPO3\CMS\Backend\Utility\BackendUtility::getRecord('tt_content',$parameters['row']['uid']); | |
$parameters['title'] = $contentRecord['title']; | |
} | |
} | |
} | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment