Horde_Core_Ui_Tabs
extends Horde_Core_Ui_Widget
in package
The Horde_Core_Ui_Tabs:: class manages and renders a tab-like interface.
Copyright 2001-2003 Robert E. Coyle robertecoyle@hotmail.com Copyright 2003-2017 Horde LLC (http://www.horde.org/)
See the enclosed file LICENSE for license information (LGPL). If you did not receive this file, see http://www.horde.org/licenses/lgpl21.
Tags
Table of Contents
Properties
- $_config : array<string|int, mixed>
- An array of name => value pairs which configure how this widget behaves.
- $_name : string
- The name of this widget. This is used as the basename for variables we access and manipulate.
- $_preserve : array<string|int, mixed>
- Any variables that should be preserved in all of the widget's links.
- $_tabs : array<string|int, mixed>
- The array of tabs.
- $_url_callback : callable
- Holds the name of a callback function to call on any URLS before they are used/returned. If an array, it is taken as an object/method name, if a string, it is taken as a php function.
- $_vars : Horde_Variables
- A reference to a Horde_Variables:: object this widget will use and manipulate.
Methods
- __construct() : mixed
- Construct a new UI Widget interface.
- addTab() : mixed
- Adds a tab to the interface.
- getTitleFromAction() : string
- Returns the title of the tab with the specified name.
- preserve() : mixed
- Instructs widget to preserve a variable or a set of variables.
- render() : mixed
- Renders the tabs.
- _addPreserved() : mixed
- TODO
- _link() : mixed
- TODO
Properties
$_config
An array of name => value pairs which configure how this widget behaves.
protected
array<string|int, mixed>
$_config
$_name
The name of this widget. This is used as the basename for variables we access and manipulate.
protected
string
$_name
$_preserve
Any variables that should be preserved in all of the widget's links.
protected
array<string|int, mixed>
$_preserve
= array()
$_tabs
The array of tabs.
protected
array<string|int, mixed>
$_tabs
= array()
$_url_callback
Holds the name of a callback function to call on any URLS before they are used/returned. If an array, it is taken as an object/method name, if a string, it is taken as a php function.
protected
callable
$_url_callback
= array('Horde', 'url')
$_vars
A reference to a Horde_Variables:: object this widget will use and manipulate.
protected
Horde_Variables
$_vars
Methods
__construct()
Construct a new UI Widget interface.
public
__construct(string $name, Horde_Variables $vars[, array<string|int, mixed> $config = array() ]) : mixed
Parameters
- $name : string
-
The name of the variable which will track this UI widget's state.
- $vars : Horde_Variables
-
A Horde_Variables:: object.
- $config : array<string|int, mixed> = array()
-
The widget's configuration.
addTab()
Adds a tab to the interface.
public
addTab(string $title, Horde_Url $link[, mixed $params = array() ]) : mixed
Parameters
- $title : string
-
The text which appears on the tab.
- $link : Horde_Url
-
The target page.
- $params : mixed = array()
-
Either a string value to set the tab variable to, or a hash of parameters. If an array, the tab variable can be set by the 'tabname' key.
getTitleFromAction()
Returns the title of the tab with the specified name.
public
getTitleFromAction(string $tabname) : string
Parameters
- $tabname : string
-
The name of the tab.
Return values
string —The tab's title.
preserve()
Instructs widget to preserve a variable or a set of variables.
public
preserve(string|array<string|int, mixed> $var[, mixed $value = null ]) : mixed
Parameters
- $var : string|array<string|int, mixed>
-
The name of the variable to preserve, or an array of variables to preserve.
- $value : mixed = null
-
If preserving a single key, the value of the variable to preserve.
render()
Renders the tabs.
public
render([string $active_tab = null ][, string $class = 'tabset' ]) : mixed
Parameters
- $active_tab : string = null
-
If specified, the name of the active tab. If not, the active tab is determined automatically.
- $class : string = 'tabset'
-
The CSS class of the tabset.
_addPreserved()
TODO
protected
_addPreserved(mixed $link) : mixed
Parameters
- $link : mixed
_link()
TODO
protected
_link(mixed $link) : mixed
Parameters
- $link : mixed