Skip to content

Instantly share code, notes, and snippets.

@Nimmermaer
Last active January 21, 2017 08:16
Show Gist options
  • Save Nimmermaer/0d8167c504752d9ce801890a615a4c68 to your computer and use it in GitHub Desktop.
Save Nimmermaer/0d8167c504752d9ce801890a615a4c68 to your computer and use it in GitHub Desktop.
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