菜单

Typo3 常用函数

2011年03月16日 - typo3

typo3 常用函数, 详细请参考http://api.typo3.org/typo3v4/current/html/classes.html

Getting values from GET or POST vars
t3lib_div::_GP
t3lib_div::_GET
t3lib_div::_POST

Database Access API
$GLOBALS[‘TYPO3_DB’]->
exec_INSERTquery
exec_UPDATEquery
exec_DELETEquery
exec_SELECTquery

 

Preparing a URL for a HTTP location-header
t3lib_div::locationHeaderUrl

$this->pi_initPIflexForm(); //get flexform XML
$this->pi_getFFvalue($piFlexForm, $key, $sheet);

$this->storagePid = $this->pi_getPidList($this->cObj->data[‘pages’], $this->cObj->data[‘recursive’]);

$GLOBALS[‘TSFE’]->additionalHeaderData[$this->extKey] = “”;

$this->pi_getPageLink(“11″, ”, array())

Template:
$this->template = $this->cObj->fileResource($templateFile);
$template = $this->cObj->getSubpart ( $this->template, ‘###TEMPLATE_TEST###’ );
$content = $this->cObj->substituteMarkerArrayCached($template, $markerArray);

 

Environment-safe server and environment variables.
t3lib_div::getIndpEnv
Creating objects
t3lib_div::makeInstance
t3lib_div::makeInstanceClassName

Loading full table description into $TCA
t3lib_div::loadTCA

Returns true if an extension is loaded (installed)
t3lib_extMgm::isLoaded

Get file path to an extension directory
t3lib_extMgm::extPath
t3lib_extMgm::extRelPath
t3lib_extMgm::siteRelPath

Evaluate files and directories for security reasons
t3lib_div::getFileAbsFileName
t3lib_div::validPathStr
t3lib_div::isAbsPath
t3lib_div::isAllowedAbsPath
t3lib_div::fixWindowsFilePath

Creates directory
t3lib_div::mkdir

Functions for handling uploads and temporary files
t3lib_div::upload_to_tempfile
t3lib_div::unlink_tempfile
t3lib_div::tempnam

Truncating a string for visual display, observing the character set (backend only)
t3lib_div::fixed_lgd_cs

Preparing a string for output between <textarea> tags.
t3lib_div::formatForTextarea

发表评论

电子邮件地址不会被公开。 必填项已用*标注