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: * @return void
30: */
31: public function __construct($content = NULL) {
32: parent::__construct($content);
33: $this->_tag = 'td';
34: }
35:
36: /**
37: * Sets the table width
38: *
39: * @param string $width Width
40: * @return cHTMLTableData $this
41: */
42: public function setWidth($width) {
43: return $this->updateAttribute('width', $width);
44: }
45:
46: /**
47: * Sets the table height
48: *
49: * @param string $height Height
50: * @return cHTMLTableData $this
51: */
52: public function setHeight($height) {
53: return $this->updateAttribute('height', $height);
54: }
55:
56: /**
57: * Sets the table alignment
58: *
59: * @param string $alignment Alignment
60: * @return cHTMLTableData $this
61: */
62: public function setAlignment($alignment) {
63: return $this->updateAttribute('align', $alignment);
64: }
65:
66: /**
67: * Sets the table vertical alignment
68: *
69: * @param string $alignment Vertical Alignment
70: * @return cHTMLTableData $this
71: */
72: public function setVerticalAlignment($alignment) {
73: return $this->updateAttribute('valign', $alignment);
74: }
75:
76: /**
77: * Sets the table background color
78: *
79: * @param string $color background color
80: * @return cHTMLTableData $this
81: */
82: public function setBackgroundColor($color) {
83: return $this->updateAttribute('bgcolor', $color);
84: }
85:
86: /**
87: * Sets the table colspan
88: *
89: * @param string $colspan Colspan
90: * @return cHTMLTableData $this
91: */
92: public function setColspan($colspan) {
93: return $this->updateAttribute('colspan', $colspan);
94: }
95:
96: }
97: