1: <?php
2: /**
3: * Extends Core's Simplehtml class to allow us to catch expand/collapse
4: * requests so that the 'expanded_folders' pref can be updated.
5: *
6: * Copyright 2012 Horde LLC (http://www.horde.org/)
7: *
8: * See the enclosed file COPYING for license information (GPL). If you
9: * did not receive this file, see http://www.horde.org/licenses/gpl.
10: *
11: * @author Michael Slusarz <slusarz@horde.org>
12: * @category Horde
13: * @license http://www.horde.org/licenses/gpl GPL
14: * @package IMP
15: */
16: class IMP_Tree_Simplehtml extends Horde_Core_Tree_Simplehtml
17: {
18: /**
19: * Should this element be toggled?
20: *
21: * @param string $node_id The node ID.
22: *
23: * @return boolean True of the element should be toggled.
24: */
25: public function shouldToggle($id)
26: {
27: return ($this->_nodeId($id) == Horde_Util::getFormData(Horde_Tree::TOGGLE . $this->_instance));
28: }
29:
30: }
31: