TYPO3 CMS  TYPO3_6-2
FramesetRenderer.php
Go to the documentation of this file.
1 <?php
3 
22 
31  public function make($setup) {
32  $content = '';
33  if (is_array($setup)) {
35  foreach ($sKeyArray as $theKey) {
36  $theValue = $setup[$theKey];
37  if ((int)$theKey && ($conf = $setup[$theKey . '.'])) {
38  switch ($theValue) {
39  case 'FRAME':
40  $typeNum = (int)$GLOBALS['TSFE']->tmpl->setup[$conf['obj'] . '.']['typeNum'];
41  if (!$conf['src'] && !$typeNum) {
42  $typeNum = -1;
43  }
44  $content .= '<frame' . $this->frameParams($conf, $typeNum) . ' />' . LF;
45  break;
46  case 'FRAMESET':
47  $frameset = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance('TYPO3\\CMS\\Frontend\\Page\\FramesetRenderer');
48  $content .= $frameset->make($conf) . LF;
49  break;
50  }
51  }
52  }
53  return '<frameset' . $this->framesetParams($setup) . '>' . LF . $content . '</frameset>';
54  }
55  }
56 
67  public function frameParams($setup, $typeNum) {
68  $paramStr = '';
69  $name = $setup['obj'];
70  if ($setup['src'] || $setup['src.']) {
71  $src = $setup['src'];
72  if (is_array($setup['src.'])) {
73  $src = $GLOBALS['TSFE']->cObj->stdWrap($src, $setup['src.']);
74  }
75  $paramStr .= ' src="' . htmlspecialchars($src) . '"';
76  } else {
77  $LD = $GLOBALS['TSFE']->tmpl->linkData($GLOBALS['TSFE']->page, '', $GLOBALS['TSFE']->no_cache, '', '', ($setup['options'] ? '&' . $setup['options'] : '') . $GLOBALS['TSFE']->cObj->getClosestMPvalueForPage($GLOBALS['TSFE']->page['uid']), (int)$typeNum);
78  $finalURL = $LD['totalURL'];
79  $paramStr .= ' src="' . htmlspecialchars($finalURL) . '"';
80  }
81  if ($setup['name']) {
82  $paramStr .= ' name="' . $setup['name'] . '"';
83  } else {
84  $paramStr .= ' name="' . $name . '"';
85  }
86  if ($setup['params']) {
87  $paramStr .= ' ' . $setup['params'];
88  }
89  return $paramStr;
90  }
91 
101  public function framesetParams($setup) {
102  $paramStr = '';
103  if ($setup['cols']) {
104  $paramStr .= ' cols="' . $setup['cols'] . '"';
105  }
106  if ($setup['rows']) {
107  $paramStr .= ' rows="' . $setup['rows'] . '"';
108  }
109  if ($setup['params']) {
110  $paramStr .= ' ' . $setup['params'];
111  }
112  return $paramStr;
113  }
114 
115 }
if(isset($ajaxID)) if(in_array( $ajaxID, $noUserAjaxIDs))
Re-apply pairs of single-quotes to the text.
Definition: ajax.php:40
if(!defined('TYPO3_MODE')) $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['t3lib/class.t3lib_userauth.php']['logoff_pre_processing'][]
static sortedKeyList($setupArr, $acceptOnlyProperties=FALSE)