Zum Inhalt springen

userfunc in flexform?

Erstellt am 16. August 2007 · 2 Antworten · letzte Antwort am 20. August 2007

Tags: Frage

pranko_janko ·

hallo,

ich habe soeben zum ersten mal in flexform "<itemsProcFunc>" benutzt ...
und meine function wird auch aufgerufen jedoch wovon?
innerhalb meiner function

class user_volume_flexFunctions {
	function getTemplates($config)
	{
		$dir = "/ext/myext/templates/";
	var_dump(is_dir($dir));
	if (is_dir($dir)) 
	{
	    if ($dh = opendir($dir)) 
	    {
		while (($file = readdir($dh)) !== false) 
		{
			$x= filetype($dir . $file);
			echo "test:".$x;
			$lable=  $x;
			$key= $x;
			$config['items'][]= array($lable, $key);
		}
		closedir($dh);
	    }
	}
		return $config;
	}
}

jedoch hab ich keine ahnung von wo ich den pfad relativ angebe?
direkt mit "/templates/" und "/typo3conf/ext/my_ext/templates/" oder "/ext/my_ext/templates/" funktioniert alles nicht!!

how to? leider hab ich keinen plan mehr ...

lg, pranko

UserNeo ·

Also es gibt eine globale Variable

$GLOBALS['TYPO3_LOADED_EXT']['ext-key']['siteRelPath'].'pi1/class.zip.php';

Mal eine Frage zu itemsProcFunc, wie sieht das in der FlexForms XML aus? Und ist deine Klasse user_volume_flexFunctions in einer extra Datei oder befindet sich diese in der class.tx_ext_pi1.php Datei?