|
TYPO3 API
SVNRelease
|
00001 <?php 00002 /*************************************************************** 00003 * Copyright notice 00004 * 00005 * (c) 2011 Jo Hasenau <info@cybercraft.de> 00006 * All rights reserved 00007 * 00008 * This script is part of the TYPO3 project. The TYPO3 project is 00009 * free software; you can redistribute it and/or modify 00010 * it under the terms of the GNU General Public License as published by 00011 * the Free Software Foundation; either version 2 of the License, or 00012 * (at your option) any later version. 00013 * 00014 * The GNU General Public License can be found at 00015 * http://www.gnu.org/copyleft/gpl.html. 00016 * A copy is found in the textfile GPL.txt and important notices to the license 00017 * from the author is found in LICENSE.txt distributed with these scripts. 00018 * 00019 * 00020 * This script is distributed in the hope that it will be useful, 00021 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00022 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00023 * GNU General Public License for more details. 00024 * 00025 * This copyright notice MUST APPEAR in all copies of the script! 00026 ***************************************************************/ 00027 00028 /** 00029 * Contains PHP_SCRIPT_EXT class object. 00030 * 00031 * $Id$ 00032 * @author Jo Hasenau <info@cybercraft.de> 00033 */ 00034 class tslib_content_PhpScriptExternal extends tslib_content_Abstract { 00035 00036 /** 00037 * Rendering the cObject, PHP_SCRIPT__EXT 00038 * 00039 * @param array Array of TypoScript properties 00040 * @return string Output 00041 */ 00042 public function render($conf = array()) { 00043 $file = isset($conf['file.']) 00044 ? $this->cObj->stdWrap($conf['file'], $conf['file.']) 00045 : $conf['file']; 00046 00047 $incFile = $GLOBALS['TSFE']->tmpl->getFileName($file); 00048 $content = ''; 00049 if ($incFile && $GLOBALS['TSFE']->checkFileInclude($incFile)) { 00050 $substKey = 'EXT_SCRIPT.' . $GLOBALS['TSFE']->uniqueHash(); 00051 $content .= '<!--' . $substKey . '-->'; 00052 $GLOBALS['TSFE']->config['EXTincScript'][$substKey] = array ( 00053 'file' => $incFile, 'conf' => $conf, 'type' => 'SCRIPT' 00054 ); 00055 $GLOBALS['TSFE']->config['EXTincScript'][$substKey]['data'] = $this->cObj->data; 00056 } 00057 00058 if (isset($conf['stdWrap.'])) { 00059 $content = $this->cObj->stdWrap($content, $conf['stdWrap.']); 00060 } 00061 00062 return $content; 00063 } 00064 00065 } 00066 00067 00068 if (defined('TYPO3_MODE') && isset($GLOBALS['TYPO3_CONF_VARS'][TYPO3_MODE]['XCLASS']['tslib/content/class.tslib_content_phpscriptexternal.php'])) { 00069 include_once($GLOBALS['TYPO3_CONF_VARS'][TYPO3_MODE]['XCLASS']['tslib/content/class.tslib_content_phpscriptexternal.php']); 00070 } 00071 00072 ?>
1.8.0