1: <?php
2:
3: /**
4: * This file contains the cHTMLList 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: * cHTMLList class represents a list.
20: *
21: * @package Core
22: * @subpackage GUI_HTML
23: */
24: class cHTMLList extends cHTMLContentElement {
25:
26: /**
27: * Constructor to create an instance of this class.
28: *
29: * Creates an HTML list element.
30: *
31: * @param string $type [optional]
32: * type of the list - ul or ol
33: * @param string $id [optional]
34: * the ID of the list element
35: * @param string $class [optional]
36: * the class of the list element
37: * @param array|string|object $elements [optional]
38: * the elements of this list
39: */
40: public function __construct($type = 'ul', $id = '', $class = '', $elements = array()) {
41: parent::__construct($elements, $class, $id);
42: if ($type !== 'ul' && $type !== 'ol') {
43: $type = 'ul';
44: }
45: $this->_tag = $type;
46: }
47:
48: }
49: