/** * Implements the stdWrap property "tableStyle"; Basically this generates a <table>-tag with properties which is wrapped around the input value. * * @param string $theValue The input value * @param array $conf TypoScript properties for the "TypoScript function" '->textStyle' * @return string The processed output value * @access private * @see stdWrap() * @deprecated since TYPO3 CMS 7, will be removed in TYPO3 CMS 8 */ public function tableStyle($theValue, $conf) { $this->typoScriptFrontendController->logDeprecatedTyposcript('tableStyle', 'Deprecated since 7.1 and will be removed with CMS 8. Use CSS instead'); $conf['color.'][240] = 'black'; $conf['color.'][241] = 'white'; $conf['color.'][242] = '#333333'; $conf['color.'][243] = 'gray'; $conf['color.'][244] = 'silver'; $align = isset($conf['align.']) ? $this->stdWrap($conf['align'], $conf['align.']) : $conf['align']; $border = isset($conf['border.']) ? (int) $this->stdWrap($conf['border'], $conf['border.']) : (int) $conf['border']; $cellspacing = isset($conf['cellspacing.']) ? (int) $this->stdWrap($conf['cellspacing'], $conf['cellspacing.']) : (int) $conf['cellspacing']; $cellpadding = isset($conf['cellpadding.']) ? (int) $this->stdWrap($conf['cellpadding'], $conf['cellpadding.']) : (int) $conf['cellpadding']; $color = $this->data[$conf['color.']['field']]; $theColor = $conf['color.'][$color] ? $conf['color.'][$color] : $conf['color.']['default']; // Assembling the table tag $tableTagArray = array('<table'); $tableTagArray[] = 'border="' . $border . '"'; $tableTagArray[] = 'cellspacing="' . $cellspacing . '"'; $tableTagArray[] = 'cellpadding="' . $cellpadding . '"'; if ($align) { $tableTagArray[] = 'align="' . $align . '"'; } if ($theColor) { $tableTagArray[] = 'bgcolor="' . $theColor . '"'; } if ($conf['params']) { $tableTagArray[] = $conf['params']; } $tableWrap = implode(' ', $tableTagArray) . '> | </table>'; $theValue = $this->wrap($theValue, $tableWrap); // return return $theValue; }