3
* The Horde_UI_Widget:: class provides base functionality for other Horde
6
* $Horde: framework/UI/UI/Widget.php,v 1.7.10.1 2005/01/03 12:19:19 jan Exp $
8
* Copyright 2003-2005 Jason M. Felice <jfelice@cronosys.com>
10
* See the enclosed file LICENSE for license information (LGPL).
12
* @version $Revision: 1.7.10.1 $
13
* @since Horde_UI 0.0.1
16
class Horde_UI_Widget {
19
* Any variables that should be preserved in all of the widget's
21
* @var array $_preserve
23
var $_preserve = array();
26
* The name of this widget. This is used as the basename for variables
27
* we access and manipulate.
33
* A reference to a Variables:: object this widget will use and
35
* @var object Variables $_vars
40
* An array of name => value pairs which configure how this widget
46
* Construct a new UI Widget interface.
50
* @param string $name The name of the variable which will track this
52
* @param Variables &$vars A Variables:: object.
53
* @param array $config The widget's configuration.
55
function Horde_UI_Widget($name, &$vars, $config = array())
58
$this->_vars = &$vars;
59
$this->_config = $config;
63
* Instruct Horde_UI_Widget:: to preserve a variable.
67
* @param string $var The name of the variable to preserve.
68
* @param mixed $value The value of the variable to preserve.
70
function preserve($var, $value)
72
$this->_preserve[$var] = $value;
78
function _addPreserved($link)
80
foreach ($this->_preserve as $varName => $varValue) {
81
$link = Util::addParameter($link, $varName, $varValue);
91
* @param optional mixed $data The widget's state data.