[TYPO3-mvc] UserFunc error in extbase extension

Stefan Kruse besucher80 at gmx.de
Thu Nov 14 08:53:05 CET 2013


Hi, 

i need my own userFunction in TypoScript.

So I add a php file in my extension in:

EXT:myExt/Classes/Utility/UserFunc.php

With only a function like:

<?php

	/**
	 * Fetch the user data
	 *
	 */
	function user_getcurrentnotepaduser() {
		// Here my code
	}
	
?>

The I register the file in the ext_localconf.php:

require_once( \t3lib_extMgm::extPath(myExt).'/Classes/Utility/UserFunc.php'
);

In my TypoScript I use:

[userFunc = user_getcurrentnotepaduser ()]
	lib.navigation.main {
		10 {
			special.value = 2,3,4,5,6
		}
	}
[end]

But every time I load the TYPO3 Backend I got an error like this:

Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to
allocate 65484 bytes) in
/var/www/tl24-staging/typo3_src-6.1.3/typo3/sysext/core/Classes/TypoScript/P
arser/TypoScriptParser.php on line 410

When I comment the userFunc out, everything is fine, so I think theres an
error.

Is there another way to go or do I make something wrong?

Thanks for helping

Stefan



More information about the TYPO3-project-typo3v4mvc mailing list