1: <?php
2:
3: /**
4: * This file contains the tree class.
5: *
6: * @package Core
7: * @subpackage GUI
8: * @version SVN Revision $Rev:$
9: *
10: * @author Timo Hummel
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: * Tree class
21: *
22: * @package Core
23: * @subpackage GUI
24: */
25: class cTree extends cTreeItem {
26:
27: /**
28: * Tree icon
29: *
30: * @var string
31: */
32: protected $_treeIcon;
33:
34: /**
35: * @todo The root item currently has to be a "0".
36: * This is a bug, feel free to fix it.
37: *
38: * @param string $name [optional]
39: */
40: public function __construct($name = "") {
41: parent::__construct(0, $name);
42: }
43:
44: /**
45: * sets a new name for the tree.
46: *
47: * @param string $name
48: * Name of the tree
49: */
50: public function setTreeName($name) {
51: $this->setName($name);
52: }
53:
54: /**
55: * Tree icon setter
56: *
57: * @param string $path
58: */
59: public function setIcon($path) {
60: $this->setTreeIcon($path);
61: }
62:
63: /**
64: * Tree icon setter
65: *
66: * @param string $path
67: */
68: public function setTreeIcon($path) {
69: $this->_treeIcon = $path;
70: }
71:
72: /**
73: * Tree icon getter
74: *
75: * @return string
76: */
77: public function getTreeIcon() {
78: return $this->_treeIcon;
79: }
80:
81: }
82: