|
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 CTABLE 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_ContentTable extends tslib_content_Abstract { 00037 00038 /** 00039 * Rendering the cObject, CTABLE 00040 * 00041 * @param array Array of TypoScript properties 00042 * @return string Output 00043 */ 00044 public function render($conf = array()) { 00045 00046 $controlTable = t3lib_div::makeInstance('tslib_controlTable'); 00047 00048 $tableParams = isset($conf['tableParams.']) 00049 ? $this->cObj->stdWrap($conf['tableParams'],$conf['tableParams.']) 00050 : $conf['tableParams']; 00051 if ($tableParams) { 00052 $controlTable->tableParams = $tableParams; 00053 } 00054 // loads the pagecontent 00055 $conf['cWidth'] = isset($conf['cWidth.']) 00056 ? $this->cObj->stdWrap($conf['cWidth'],$conf['cWidth.']) 00057 : $conf['cWidth']; 00058 $controlTable->contentW = $conf['cWidth']; 00059 00060 // loads the menues if any 00061 if (is_array($conf['c.'])) { 00062 $controlTable->content = $this->cObj->cObjGet($conf['c.'], 'c.'); 00063 $contentTDParams = isset($conf['c.']['TDParams.']) 00064 ? $this->cObj->stdWrap($conf['c.']['TDParams'],$conf['c.']['TDParams.']) 00065 : $conf['c.']['TDParams']; 00066 $controlTable->contentTDparams = isset($contentTDParams) 00067 ? $contentTDParams 00068 : 'valign="top"'; 00069 } 00070 if (is_array($conf['lm.'])) { 00071 $controlTable->lm = $this->cObj->cObjGet($conf['lm.'], 'lm.'); 00072 $lmTDParams = isset($conf['lm.']['TDParams.']) 00073 ? $this->cObj->stdWrap($conf['lm.']['TDParams'],$conf['lm.']['TDParams.']) 00074 : $conf['lm.']['TDParams']; 00075 $controlTable->lmTDparams = isset($lmTDParams) 00076 ? $lmTDParams 00077 : 'valign="top"'; 00078 } 00079 if (is_array($conf['tm.'])) { 00080 $controlTable->tm = $this->cObj->cObjGet($conf['tm.'], 'tm.'); 00081 $tmTDParams = isset($conf['tm.']['TDParams.']) 00082 ? $this->cObj->stdWrap($conf['tm.']['TDParams'],$conf['tm.']['TDParams.']) 00083 : $conf['tm.']['TDParams']; 00084 $controlTable->tmTDparams = isset($tmTDParams) 00085 ? $tmTDParams 00086 : 'valign="top"'; 00087 } 00088 if (is_array($conf['rm.'])) { 00089 $controlTable->rm = $this->cObj->cObjGet($conf['rm.'], 'rm.'); 00090 $rmTDParams = isset($conf['rm.']['TDParams.']) 00091 ? $this->cObj->stdWrap($conf['rm.']['TDParams'],$conf['rm.']['TDParams.']) 00092 : $conf['rm.']['TDParams']; 00093 $controlTable->rmTDparams = isset($rmTDParams) 00094 ? $rmTDParams 00095 : 'valign="top"'; 00096 } 00097 if (is_array($conf['bm.'])) { 00098 $controlTable->bm = $this->cObj->cObjGet($conf['bm.'], 'bm.'); 00099 $bmTDParams = isset($conf['bm.']['TDParams.']) 00100 ? $this->cObj->stdWrap($conf['bm.']['TDParams'],$conf['bm.']['TDParams.']) 00101 : $conf['bm.']['TDParams']; 00102 $controlTable->bmTDparams = isset($bmTDParams) 00103 ? $bmTDParams 00104 : 'valign="top"'; 00105 } 00106 00107 $conf['offset'] = isset($conf['offset.']) 00108 ? $this->cObj->stdWrap($conf['offset'],$conf['offset.']) 00109 : $conf['offset']; 00110 00111 $conf['cMargins'] = isset($conf['cMargins.']) 00112 ? $this->cObj->stdWrap($conf['cMargins'],$conf['cMargins.']) 00113 : $conf['cMargins']; 00114 00115 $theValue = $controlTable->start($conf['offset'], $conf['cMargins']); 00116 00117 if (isset($conf['stdWrap.'])) { 00118 $theValue = $this->cObj->stdWrap($theValue, $conf['stdWrap.']); 00119 } 00120 00121 return $theValue; 00122 00123 } 00124 } 00125 00126 00127 if (defined('TYPO3_MODE') && isset($GLOBALS['TYPO3_CONF_VARS'][TYPO3_MODE]['XCLASS']['tslib/content/class.tslib_content_contenttable.php'])) { 00128 include_once($GLOBALS['TYPO3_CONF_VARS'][TYPO3_MODE]['XCLASS']['tslib/content/class.tslib_content_contenttable.php']); 00129 } 00130 00131 ?>
1.8.0