![]() |
Documentación GVHIDRA 3.1.5
|
Métodos públicos | |
HTML_TreeNode ($options=array(), $events=array()) | |
setOption ($option, $value) | |
& | addItem (&$node) |
_ensureVisible () | |
Campos de datos | |
$text | |
$link | |
$icon | |
$expandedIcon | |
$cssClass | |
$linkTarget | |
$items | |
$expanded | |
$isDynamic | |
$ensureVisible | |
$parent | |
$events |
Definición en la línea 300 del archivo TreeMenu.php.
_ensureVisible | ( | ) |
Private function to handle ensureVisible stuff
private
Definición en la línea 467 del archivo TreeMenu.php.
{ $this->ensureVisible = true; $this->expanded = true; if (!is_null($this->parent)) { $this->parent->_ensureVisible(); } }
& addItem | ( | &$ | node | ) |
Adds a new subnode to this node.
public
object | $node | The new node |
If the subnode has ensureVisible set it needs to be handled, and all parents set accordingly.
Definición en la línea 446 del archivo TreeMenu.php.
{ $node->parent = &$this; $this->items[] = &$node; if ($node->ensureVisible) { $this->_ensureVisible(); } return $this->items[count($this->items) - 1]; }
HTML_TreeNode | ( | $ | options = array() , |
$ | events = array() |
||
) |
Constructor
public
array | $options | An array of options which you can pass to change the way this node looks/acts. This can consist of: o text The title of the node, defaults to blank o link The link for the node, defaults to blank o icon The icon for the node, defaults to blank o expandedIcon The icon to show when the node is expanded o cssClass The CSS class for this node, defaults to blank o expanded The default expanded status of this node, defaults to false This doesn't affect non dynamic presentation types o linkTarget Target for the links. Defaults to linkTarget of the HTML_TreeMenu_Presentation. o isDynamic If this node is dynamic or not. Only affects certain presentation types. o ensureVisible If true this node will be made visible despite the expanded settings, and client side persistence. Will not affect some presentation styles, such as Listbox. Default is false |
array | $events | An array of javascript events and the corresponding event handlers. Additionally to the standard javascript events you can specify handlers for the 'onexpand', 'oncollapse' and 'ontoggle' events which will be fired whenever a node is collapsed and/or expanded. |
Definición en la línea 399 del archivo TreeMenu.php.
{ $this->text = ''; $this->link = ''; $this->icon = ''; $this->expandedIcon = ''; $this->cssClass = ''; $this->expanded = false; $this->isDynamic = true; $this->ensureVisible = false; $this->linkTarget = null; $this->parent = null; $this->events = $events; foreach ($options as $option => $value) { $this->$option = $value; } }
setOption | ( | $ | option, |
$ | value | ||
) |
Allows setting of various parameters after the initial constructor call. Possible options you can set are: o text o link o icon o cssClass o expanded o isDynamic o ensureVisible ie The same options as in the constructor
public
string | $option | Option to set |
string | $value | Value to set the option to |
Definición en la línea 435 del archivo TreeMenu.php.
{ $this->$option = $value; }
$cssClass |
Definición en la línea 330 del archivo TreeMenu.php.
$ensureVisible |
Definición en la línea 360 del archivo TreeMenu.php.
$events |
Definición en la línea 372 del archivo TreeMenu.php.
$expanded |
Definición en la línea 348 del archivo TreeMenu.php.
$expandedIcon |
Definición en la línea 324 del archivo TreeMenu.php.
$icon |
Definición en la línea 318 del archivo TreeMenu.php.
$isDynamic |
Definición en la línea 354 del archivo TreeMenu.php.
$items |
Definición en la línea 342 del archivo TreeMenu.php.
$link |
Definición en la línea 312 del archivo TreeMenu.php.
$linkTarget |
Definición en la línea 336 del archivo TreeMenu.php.
$parent |
Definición en la línea 366 del archivo TreeMenu.php.
$text |
Definición en la línea 306 del archivo TreeMenu.php.