protected function getLabelPropertyName($table, $type)
{
$typoScript = $this->getConfigurationService()->getAllTypoScript();
if (TRUE === isset($typoScript['config']['tx_extbase']['persistence']['classes'][$type])) {
$mapping = $typoScript['config']['tx_extbase']['persistence']['classes'][$type];
if (TRUE === isset($mapping['mapping']['tableName'])) {
$table = $mapping['mapping']['tableName'];
}
}
$labelField = $GLOBALS['TCA'][$table]['ctrl']['label'];
$propertyName = GeneralUtility::underscoredToLowerCamelCase($labelField);
return $propertyName;
}