[MERGE] Branch 'master' of ssh://phabricator.glanzstueck.agency/source/typo3-template_aide

This commit is contained in:
Philipp Dieter 2025-05-20 16:23:10 +02:00
commit a4faec9eb3
2 changed files with 9 additions and 1 deletions

View File

@ -41,7 +41,11 @@ class TranslationController extends \TYPO3\CMS\Extbase\Mvc\Controller\ActionCont
$languageFactory = GeneralUtility::makeInstance(
LocalizationFactory::class
);
if (version_compare(TYPO3_branch, '10.0', '>=')) {
$language = $this->request->getAttribute('language');
} else {
$language = $GLOBALS['TYPO3_REQUEST']->getAttribute('language');
}
$locale = $language->getLocale();
//\TYPO3\CMS\Extbase\Utility\DebuggerUtility::var_dump(
// $locale, '$locale', 3, true, false

View File

@ -17,6 +17,7 @@ use TYPO3\CMS\Core\Resource\FileReference as CoreFileReference;
use TYPO3\CMS\Core\Utility\GeneralUtility;
use TYPO3\CMS\Extbase\Domain\Model\FileReference as ExtbaseFileReference;
use TYPO3\CMS\Extbase\Object\ObjectManager;
use TYPO3\CMS\Extbase\Persistence\Generic\LazyLoadingProxy;
use TYPO3\CMS\Extbase\Persistence\Generic\LazyObjectStorage;
use TYPO3\CMS\Extbase\Persistence\ObjectStorage;
use TYPO3\CMS\Extbase\Service\ImageService;
@ -76,6 +77,9 @@ class ApiUtility
if (substr($method, 0, 3) === 'get') {
$methodResult = call_user_func([$row, $method]);
$attributeName = lcfirst(substr($method, 3));
if (get_class($methodResult) == LazyLoadingProxy::class) {
$methodResult = $methodResult->_loadRealInstance();
}
$propertieResults[$attributeName] = $methodResult;
}
}