1: <?php
2: 3: 4: 5: 6: 7: 8: 9: 10: 11: 12: 13: 14:
15: class IMP_Tree_Jquerymobile extends Horde_Tree_Jquerymobile
16: {
17: 18:
19: public function __construct($name, array $params = array())
20: {
21: $this->_allowed[] = 'container';
22: parent::__construct($name, $params);
23: }
24:
25: 26:
27: public function addNode($id, $parent, $label, $indent = null,
28: $expanded = true, $params = array(),
29: $extra_right = array(), $extra_left = array())
30: {
31: $params['url'] = '#';
32: parent::addNode($id, $parent, $label, $indent, $expanded, $params, $extra_right, $extra_left);
33: }
34:
35: 36:
37: protected function _buildTree($node_id, $special)
38: {
39: $node = &$this->_nodes[$node_id];
40: $output = '';
41:
42: if (empty($node['container'])) {
43: $output = parent::_buildTree($node_id, $special);
44: } elseif (!empty($node['children'])) {
45: foreach ($node['children'] as $val) {
46: $output .= $this->_buildTree($val, $special);
47: }
48: }
49:
50: return $output;
51: }
52:
53: }
54: