1: <?php
2: /**
3: * This file contains the cHTMLTableData class.
4: *
5: * @package Core
6: * @subpackage GUI_HTML
7: * @version SVN Revision $Rev:$
8: *
9: * @author Simon Sprankel
10: * @copyright four for business AG <www.4fb.de>
11: * @license http://www.contenido.org/license/LIZENZ.txt
12: * @link http://www.4fb.de
13: * @link http://www.contenido.org
14: */
15:
16: defined('CON_FRAMEWORK') || die('Illegal call: Missing framework initialization - request aborted.');
17:
18: /**
19: * cHTMLTableData class represents a table date.
20: *
21: * @package Core
22: * @subpackage GUI_HTML
23: */
24: class cHTMLTableData extends cHTMLContentElement {
25:
26: /**
27: * Creates an HTML td element.
28: */
29: public function __construct($content = NULL) {
30: parent::__construct($content);
31: $this->_tag = 'td';
32: }
33:
34: /**
35: * Sets the table width
36: *
37: * @param string $width Width
38: * @return cHTMLTableData $this
39: */
40: public function setWidth($width) {
41: return $this->updateAttribute('width', $width);
42: }
43:
44: /**
45: * Sets the table height
46: *
47: * @param string $height Height
48: * @return cHTMLTableData $this
49: */
50: public function setHeight($height) {
51: return $this->updateAttribute('height', $height);
52: }
53:
54: /**
55: * Sets the table alignment
56: *
57: * @param string $alignment Alignment
58: * @return cHTMLTableData $this
59: */
60: public function setAlignment($alignment) {
61: return $this->updateAttribute('align', $alignment);
62: }
63:
64: /**
65: * Sets the table vertical alignment
66: *
67: * @param string $alignment Vertical Alignment
68: * @return cHTMLTableData $this
69: */
70: public function setVerticalAlignment($alignment) {
71: return $this->updateAttribute('valign', $alignment);
72: }
73:
74: /**
75: * Sets the table background color
76: *
77: * @param string $color background color
78: * @return cHTMLTableData $this
79: */
80: public function setBackgroundColor($color) {
81: return $this->updateAttribute('bgcolor', $color);
82: }
83:
84: /**
85: * Sets the table colspan
86: *
87: * @param string $colspan Colspan
88: * @return cHTMLTableData $this
89: */
90: public function setColspan($colspan) {
91: return $this->updateAttribute('colspan', $colspan);
92: }
93:
94: }
95: