1: <?php
2:
3: /**
4: * This file contains the cHTMLAlignmentTable class.
5: *
6: * @package Core
7: * @subpackage GUI_HTML
8: * @version SVN Revision $Rev:$
9: *
10: * @author Simon Sprankel
11: * @copyright four for business AG <www.4fb.de>
12: * @license http://www.contenido.org/license/LIZENZ.txt
13: * @link http://www.4fb.de
14: * @link http://www.contenido.org
15: */
16:
17: defined('CON_FRAMEWORK') || die('Illegal call: Missing framework initialization - request aborted.');
18:
19: /**
20: * cHTMLAlignmentTable class represents an alignment table.
21: *
22: * @package Core
23: * @subpackage GUI_HTML
24: */
25: class cHTMLAlignmentTable extends cHTMLTable {
26:
27: /**
28: * Constructor.
29: */
30: public function __construct() {
31: parent::__construct();
32:
33: $this->_data = func_get_args();
34: $this->_contentlessTag = false;
35: }
36:
37: /**
38: * Generates the markup of the element.
39: *
40: * @see cHTML::render()
41: * @return string
42: * generated markup
43: */
44: public function render() {
45: $tr = new cHTMLTableRow();
46: $td = new cHTMLTableData();
47:
48: $out = '';
49:
50: foreach ($this->_data as $data) {
51: $td->setContent($data);
52: $out .= $td->render();
53: }
54:
55: $tr->setContent($out);
56:
57: $this->setContent($tr);
58:
59: return $this->toHTML();
60: }
61:
62: }
63: