Project

General

Profile

Bug #22205 ยป 0013690.patch

Administrator Admin, 2010-02-27 19:04

View differences:

typo3/template.php (Arbeitskopie)
class frontendDoc extends template {
/**
* Gets instance of PageRenderer
*
* @return t3lib_PageRenderer
*/
public function getPageRenderer() {
if (!isset($this->pageRenderer)) {
$this->pageRenderer = $GLOBALS['TSFE']->getPageRenderer();
}
return $this->pageRenderer;
}
/**
* Used in the frontend context to insert header data via TSFE->additionalHeaderData.
* Mimics header inclusion from template->startPage().
*
......
*/
public function insertHeaderData() {
/** @var $pageRenderer t3lib_PageRenderer */
$pageRenderer = $GLOBALS['TSFE']->getPageRenderer();
$this->backPath = $GLOBALS['TSFE']->backPath = TYPO3_mainDir;
$this->pageRenderer->setBackPath($this->backPath);
$this->docStyle();
// add applied JS/CSS to $GLOBALS['TSFE']
if ($this->JScode) {
$pageRenderer->addHeaderData($this->JScode);
$this->pageRenderer->addHeaderData($this->JScode);
}
if (count($this->JScodeArray)) {
foreach ($this->JScodeArray as $name => $code) {
$pageRenderer->addJsInlineCode($name, $code);
$this->pageRenderer->addJsInlineCode($name, $code);
}
}
if ($this->addPrototype) {
$pageRenderer->loadPrototype();
}
if ($this->addScriptaculous) {
$pageRenderer->loadScriptaculous();
}
if ($this->addExtJS) {
$pageRenderer->loadExtJs();
}
if ($this->inlineLanguageLabels) {
$pageRenderer->addInlineLanguageLabelArray($this->inlineLanguageLabels);
}
if ($this->inlineSettings) {
$pageRenderer->addInlineSettingArray($this->inlineSettings);
}
}
}
    (1-1/1)