1: <?php
2:
3: /**
4: * This file contains the cHTMLAlignmentTable class.
5: *
6: * @package Core
7: * @subpackage GUI_HTML
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: * cHTMLAlignmentTable class represents an alignment table.
20: *
21: * @package Core
22: * @subpackage GUI_HTML
23: */
24: class cHTMLAlignmentTable extends cHTMLTable {
25: /**
26: * @var array
27: */
28: protected $_data;
29:
30: /**
31: * Constructor to create an instance of this class.
32: */
33: public function __construct() {
34: parent::__construct();
35:
36: $this->_data = func_get_args();
37: $this->_contentlessTag = false;
38: }
39:
40: /**
41: * Generates the markup of the element.
42: *
43: * @see cHTML::render()
44: * @return string
45: * generated markup
46: */
47: public function render() {
48: $tr = new cHTMLTableRow();
49: $td = new cHTMLTableData();
50:
51: $out = '';
52:
53: foreach ($this->_data as $data) {
54: $td->setContent($data);
55: $out .= $td->render();
56: }
57:
58: $tr->setContent($out);
59:
60: $this->setContent($tr);
61:
62: return $this->toHtml();
63: }
64:
65: }
66: