Feature #16654 ยป eidtools_tssetup.diff
typo3/sysext/cms/tslib/class.tslib_eidtools.php 2007-05-06 21:44:44.000000000 +0200 | ||
---|---|---|
* 74: class tslib_eidtools
|
||
* 81: function initFeUser()
|
||
* 108: function connectDB()
|
||
* 123: function getTyposcriptSetup($pid)
|
||
*
|
||
* TOTAL FUNCTIONS: 2
|
||
* (This index is automatically created/updated by the extension "extdeveval")
|
||
... | ... | |
$TYPO3_DB->connectDB();
|
||
}
|
||
|
||
/**
|
||
* Fetches the Typoscript setup for the page $pid by determining the rootLine and then parsing
|
||
* the corresponding setups.
|
||
*
|
||
* @param integer Page ID of the page for which to fetch the typoscript setup
|
||
* @return array
|
||
* @see t3lib_tstemplate::start($theRootLine), t3lib_pageSelect::getRootLine()
|
||
*/
|
||
function getTyposcriptSetup($pid) {
|
||
|
||
// Include necessary classes:
|
||
// Note: BEfunc is needed from t3lib_tstemplate
|
||
require_once(PATH_t3lib.'class.t3lib_page.php');
|
||
require_once(PATH_t3lib.'class.t3lib_tstemplate.php');
|
||
require_once(PATH_t3lib.'class.t3lib_befunc.php');
|
||
|
||
// Create object instances:
|
||
$pageObj = t3lib_div::makeInstance('t3lib_pageSelect');
|
||
$template = t3lib_div::makeInstance('t3lib_tstemplate');
|
||
$template->init();
|
||
|
||
// Make sure we have a database connection:
|
||
tslib_eidtools::connectDB();
|
||
|
||
// Fetch rootLine and extract TS setup:
|
||
$rootLine = $pageObj->getRootLine(intval($pid));
|
||
$template->start($rootLine);
|
||
$GLOBALS['TSFE']->tmpl = $template;
|
||
|
||
// Return TS setup array:
|
||
return $template->setup;
|
||
}
|
||
}
|
||
?>
|