TYPO3 CMS  TYPO3_6-2
HorizontalRulerContentObject.php
Go to the documentation of this file.
1 <?php
3 
23 
30  public function render($conf = array()) {
31  $lineThickness = isset($conf['lineThickness.']) ? $this->cObj->stdWrap($conf['lineThickness'], $conf['lineThickness.']) : $conf['lineThickness'];
32  $lineThickness = \TYPO3\CMS\Core\Utility\MathUtility::forceIntegerInRange($lineThickness, 1, 50);
33  $lineColor = isset($conf['lineColor.']) ? $this->cObj->stdWrap($conf['lineColor'], $conf['lineColor.']) : $conf['lineColor'];
34  if (!$lineColor) {
35  $lineColor = 'black';
36  }
37  $spaceBefore = isset($conf['spaceLeft.']) ? (int)$this->cObj->stdWrap($conf['spaceLeft'], $conf['spaceLeft.']) : (int)$conf['spaceLeft'];
38  $spaceAfter = isset($conf['spaceRight.']) ? (int)$this->cObj->stdWrap($conf['spaceRight'], $conf['spaceRight.']) : (int)$conf['spaceRight'];
39  $tableWidth = isset($conf['tableWidth.']) ? (int)$this->cObj->stdWrap($conf['tableWidth'], $conf['tableWidth.']) : (int)$conf['tableWidth'];
40  if (!$tableWidth) {
41  $tableWidth = '99%';
42  }
43  $theValue = '';
44  $theValue .= '<table border="0" cellspacing="0" cellpadding="0"
45  width="' . htmlspecialchars($tableWidth) . '"
46  summary=""><tr>';
47  if ($spaceBefore) {
48  $theValue .= '<td width="1">
49  <img src="' . $GLOBALS['TSFE']->absRefPrefix . 'clear.gif"
50  width="' . $spaceBefore . '"
51  height="1" alt="" title="" />
52  </td>';
53  }
54  $theValue .= '<td bgcolor="' . $lineColor . '">
55  <img src="' . $GLOBALS['TSFE']->absRefPrefix . 'clear.gif"
56  width="1"
57  height="' . $lineThickness . '"
58  alt="" title="" />
59  </td>';
60  if ($spaceAfter) {
61  $theValue .= '<td width="1">
62  <img src="' . $GLOBALS['TSFE']->absRefPrefix . 'clear.gif"
63  width="' . $spaceAfter . '"
64  height="1" alt="" title="" />
65  </td>';
66  }
67  $theValue .= '</tr></table>';
68  if (isset($conf['stdWrap.'])) {
69  $theValue = $this->cObj->stdWrap($theValue, $conf['stdWrap.']);
70  }
71  return $theValue;
72  }
73 
74 }
static forceIntegerInRange($theInt, $min, $max=2000000000, $defaultValue=0)
Definition: MathUtility.php:32
if(!defined('TYPO3_MODE')) $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['t3lib/class.t3lib_userauth.php']['logoff_pre_processing'][]