[TYPO3-german] Instanzierung von Klassen in anderen Extensions

Rainer Schleevoigt rainer.schleevoigt at uni-hamburg.de
Fri Aug 10 14:55:51 CEST 2018


Hallo Falk,

dieser Code:


use Solarium\Client;use Solarium\Exception\HttpException;use 
TYPO3\CMS\Core\Utility\GeneralUtility;use 
TYPO3\CMS\Frontend\Controller\TypoScriptFrontendController;/// make 
solarium instance:$Solr = 
GeneralUtility::makeInstance(Solarium\Client::class);/** @var 
TypoScriptFrontendController $tsfe */$tsfe = 
GeneralUtility::makeInstance(TypoScriptFrontendController::class, 
$GLOBALS['TYPO3_CONF_VARS'], 0, 0);$setup = 
$tsfe->tmpl->setup;var_dump($setup);

führt leider zu NULL.

$tsfe != NULL

steht hier: 
https://gist.github.com/AppWerft/f92c19e161aeb55e14178dea4aa2d6fb

Gruss Rainer


Am 10.08.18 um 14:48 schrieb Falk Gebauer:
> ** @var TypoScriptFrontendController $tsfe */
> $tsfe = GeneralUtility::makeInstance(TypoScriptFrontendController::class, $GLOBALS['TYPO3_CONF_VARS'], 0, 0);
> $tsfe->connectToDB();
> $tsfe->initFEuser();
> $tsfe->determineId();
> $tsfe->initTemplate();
> $tsfe->getConfigArray();

-- 
Dipl.-Ing. Rainer Schleevoigt
Staats- und Universitaetsbibliothek Hamburg Carl von Ossietzky
IT, Forschung und Entwicklung
Hamburg Open Science
Von-Melle-Park 3, 20146 Hamburg
Telefon (040) 4283 88870 | Fax (040) 41345070
Mail: rainer.schleevoigt at sub.uni-hamburg.de
http://www.sub.uni-hamburg.de



More information about the TYPO3-german mailing list