Skip to content

Instantly share code, notes, and snippets.

@xcidar
Last active August 29, 2015 13:56
Show Gist options
  • Save xcidar/8998958 to your computer and use it in GitHub Desktop.
Save xcidar/8998958 to your computer and use it in GitHub Desktop.
Create eID script on TYPO3 6.X
<?php
//Alias long namespaces to use shorter ones.
use \TYPO3\CMS\Core as Core;
use \TYPO3\CMS\Extbase\Utility as Utility;
use \TYPO3\CMS\Frontend as Frontend;
#$a = require_once(Core\Utility\ExtensionManagementUtility::extPath('np_viewer'));
/* INITIALIZE */
// Basic TSFE Setup - get all the Page data you may need.
$TSFE = Core\Utility\GeneralUtility::makeInstance('TYPO3\CMS\Frontend\Controller\TypoScriptFrontendController', $TYPO3_CONF_VARS, 0, 0);
Frontend\Utility\CoreUtility::initLanguage();
// Get FE User Information
$TSFE->initFEuser();
// Important: no Cache for Ajax stuff
$TSFE->set_no_cache();
$TSFE->checkAlternativCoreMethods();
$TSFE->determinCore();
$TSFE->initTemplate();
$TSFE->getConfigArray();
Core\Core\Bootstrap::getInstance()->loadCachedTca();
$TSFE->cObj = Core\Utility\GeneralUtility::makeInstance('TYPO3\CMS\Frontend\ContentObject\ContentObjectRenderer');
$TSFE->settingLanguage();
$TSFE->settingLocale();
/* ACTUAL SCRIPT */
//...
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment