|
TYPO3 API
SVNRelease
|
00001 <?php 00002 /*************************************************************** 00003 * Copyright notice 00004 * 00005 * (c) 2010-2011 Xavier Perseguers <typo3@perseguers.ch> 00006 * (c) 2010-2011 Steffen Kamper <steffen@typo3.org> 00007 * All rights reserved 00008 * 00009 * This script is part of the TYPO3 project. The TYPO3 project is 00010 * free software; you can redistribute it and/or modify 00011 * it under the terms of the GNU General Public License as published by 00012 * the Free Software Foundation; either version 2 of the License, or 00013 * (at your option) any later version. 00014 * 00015 * The GNU General Public License can be found at 00016 * http://www.gnu.org/copyleft/gpl.html. 00017 * A copy is found in the textfile GPL.txt and important notices to the license 00018 * from the author is found in LICENSE.txt distributed with these scripts. 00019 * 00020 * 00021 * This script is distributed in the hope that it will be useful, 00022 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00023 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00024 * GNU General Public License for more details. 00025 * 00026 * This copyright notice MUST APPEAR in all copies of the script! 00027 ***************************************************************/ 00028 00029 /** 00030 * Contains LOAD_REGISTER class object. 00031 * 00032 * $Id: class.tslib_content.php 7905 2010-06-13 14:42:33Z ohader $ 00033 * @author Xavier Perseguers <typo3@perseguers.ch> 00034 * @author Steffen Kamper <steffen@typo3.org> 00035 */ 00036 class tslib_content_LoadRegister extends tslib_content_Abstract { 00037 00038 /** 00039 * Rendering the cObject, LOAD_REGISTER 00040 * NOTICE: This cObject does NOT return any content since it just sets internal data based on the TypoScript properties. 00041 * 00042 * @param array Array of TypoScript properties 00043 * @return string Empty string (the cObject only sets internal data!) 00044 */ 00045 public function render($conf = array()) { 00046 array_push($GLOBALS['TSFE']->registerStack, $GLOBALS['TSFE']->register); 00047 00048 if (is_array($conf)) { 00049 $isExecuted = array(); 00050 foreach ($conf as $theKey => $theValue) { 00051 $register = rtrim($theKey, '.'); 00052 if(!$isExecuted[$register]) { 00053 $registerProperties = $register . '.'; 00054 if(isset($conf[$register]) && isset($conf[$registerProperties])) { 00055 $theValue = $this->cObj->stdWrap($conf[$register], $conf[$registerProperties]); 00056 } else if(isset($conf[$registerProperties])) { 00057 $theValue = $this->cObj->stdWrap('', $conf[$registerProperties]); 00058 } 00059 $GLOBALS['TSFE']->register[$register] = $theValue; 00060 $isExecuted[$register] = true; 00061 } 00062 } 00063 } 00064 return ''; 00065 } 00066 00067 } 00068 00069 00070 if (defined('TYPO3_MODE') && isset($GLOBALS['TYPO3_CONF_VARS'][TYPO3_MODE]['XCLASS']['tslib/content/class.tslib_content_loadregister.php'])) { 00071 include_once($GLOBALS['TYPO3_CONF_VARS'][TYPO3_MODE]['XCLASS']['tslib/content/class.tslib_content_loadregister.php']); 00072 } 00073 00074 ?>
1.8.0