[TYPO3] adding new function int pi Class
Sancar Saran
sancar.saran at evodot.com
Sat Jun 23 20:22:04 CEST 2007
hi I'm trying to resolve things and get very interesting error
Here code
function main($content,$conf) {
$this->conf=$conf;
$this->pi_setPiVarDefaults();
$this->pi_loadLL();
$this->templateFileContent =
$this->cObj->cObjGetSingle($this->conf['userFunc.']['altTemplateFile'],
$this->conf['userFunc.']['altTemplateFile.']);
$GLOBALS["TSFE"]->set_no_cache();
$GLOBALS['TSFE']->additionalHeaderData[$this->extKey] = '<script
type="text/javascript"
src="'.t3lib_extMgm::siteRelPath($this->extKey).'js/evoBase.js"></script>';
// Include xaJax
require (t3lib_extMgm::extPath('xajax') . 'class.tx_xajax.php');
// Make the instance
$this->xajax = t3lib_div::makeInstance('tx_xajax');
// Decode form vars from utf8
$this->xajax->decodeUTF8InputOn();
// Encoding of the response to utf-8.
$this->xajax->setCharEncoding('utf-8');
// To prevent conflicts, prepend the extension prefix.
$this->xajax->setWrapperPrefix($this->prefixId);
// Do you want messages in the status bar?
$this->xajax->statusMessagesOn();
// Turn only on during testing
$this->xajax->debugOff();
// Register the names of the PHP functions you want to be able to call
through xajax
//
$xajax->registerFunction(array('functionNameInJavascript',&$object,'methodName'));
$this->xajax->registerFunction(array('TTTEst', &$this, 'TTTEst'));
// If this is an xajax request call our registered function, send output and
exit
$this->xajax->processRequests();
// Else create javacript and add it to the normal output
$GLOBALS['TSFE']->additionalHeaderData[$this->prefixId] =
$this->xajax->getJavascript(t3lib_extMgm::siteRelPath('xajax'));
$content.= TTTEst();
#$content.= ulVarDump($arrWData);
return $this->pi_wrapInBaseClass($content);
}// Main Function end
function TTTEst()
{
return "hello world";
}
Then I got this
Fatal error: Call to undefined function TTTEst()
in /web/typo3/typo3conf/ext/evodot_wbscgi/pi2/class.tx_evodotwbscgi_pi2.php
on line 102
Regards
Sancar
More information about the TYPO3-english
mailing list