[TYPO3-mvc] tx_sv_authbase Authentication Service and ExtBase - TS Configuration Problems

Alexander heim alexander at alexander-heim.com
Mon Dec 19 17:54:27 CET 2011


I'm working at an additional Authentication Service for Typo3. I want to keep the authentication part as small as possible and created an extbase extension, which is doing most of the stuff. This works fine, except some problems, I could workaround.
But one problem still exists. At the moment I have to set storagePid and newRecordStoragePid inside my code. I tried to use the Tx_Extbase_Core_Bootstrap to initialize Extbase with some dummy plugin, controller, action stuff. I checked some of the examples for using the scheduler with some TSFE intializations and so on. Nothing worked. Maybe I forgot something or maybe I made some mistakes.
Has someone tried already to use an extbase extension from an implementation of Authentication Service?

Some code:

	protected $storagePid = 9;
	protected $newRecordStoragePid = 9;

	function initSomeTypo3Stuff() {
		if (empty($GLOBALS['TSFE']->sys_page)) {
			$GLOBALS['TSFE']->sys_page = t3lib_div::makeInstance('t3lib_pageSelect');
		}

		if (empty($GLOBALS['TSFE']->tmpl)) {

			$GLOBALS['TSFE']->tmpl = t3lib_div::makeInstance('t3lib_tstemplate');

		}

	}

	function initExtbase() {

		$configuration = array(

			'extensionName' =>  "extensionname",

			'pluginName' =>  "pi1",

			//'persistence' =>  '<  module.tx_extensionname.persistence',

			'persistence.'=>array('storagePid'=>$this->storagePid,'newRecordStoragePid'=>$this->newRecordStoragePid),

			'switchableControllerActions' =>  array(

				'BusinessUnits' =>  array('index'),

			)

		);


		$_SERVER['REQUEST_METHOD'] = 'GET';

		$_GET['tx_extensionname_pi1']['controller'] = 'BusinessUnits';

		$_GET['tx_extensionname_pi1']['action'] = 'index';

		$GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['extbase']['extensions']['extensionname']['modules']['pi1']['controllers'] = array(

			'BusinessUnits' =>  array(

				'actions' =>  array('index')

			),

		);

	
		

		$this->extbaseBootstrap = t3lib_div::makeInstance('Tx_Extbase_Core_Bootstrap');

		$this->extbaseBootstrap->initialize($configuration);

	}

	function init() {

		$available = parent::init();

     		$this->initSomeTypo3Stuff();

     		$this->initExtbase();
	}



------

at TS is written:

plugin.tx_extensionname.persistence.storagePid = 9
plugin.tx_extensionname.persistence.newRecordStoragePid = 9
module.tx_extensionname.persistence.storagePid = 9
module.tx_extensionname.persistence.newRecordStoragePid = 9

------

and ext_localconf.php ... but this configuration is more like a dummy. I do not need any plugin at all.

Tx_Extbase_Utility_Extension::configurePlugin(
	$_EXTKEY,
	'pi1',
	array(
		'BusinessUnits' =>  'index'
	),
	array(
		'BusinessUnits' =>  'index'
	)
	
	
);




More information about the TYPO3-project-typo3v4mvc mailing list