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 |
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
namespace MyVendor\Project\Form\Element; | |
use TYPO3\CMS\Backend\Form\Element\AbstractFormElement; | |
class StaticTextElement extends AbstractFormElement | |
{ | |
/** | |
* @inheritDoc | |
*/ | |
public function render() |
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
$contentObjectRenderer = GeneralUtility::makeInstance(ContentObjectRenderer::class); | |
$contentRecordRenderer = $contentObjectRenderer->getContentObject('CONTENT'); | |
$contentRecordRenderer->setRequest($request); | |
return $contentRecordRenderer->render([ | |
'table' => 'tt_content', | |
'select.' => [ | |
'where' => '{#colPos}=' . $colPos, | |
'orderBy' => 'sorting', | |
], | |
]); |