$firstRecord = \TYPO3\CMS\Backend\Utility\BackendUtility::firstDomainRecord('example.com', 'dns');
$firstRecord = \TYPO3\CMS\Backend\Utility\BackendUtility::firstDomainRecord('example.com', 'tt_content');This code will return the first record of the tt_content table for the domain example.com. Package library: TYPO3\CMS\Backend\Utility