classname: htmlobject_tabmenu


extends: htmlobject_div

 Tabmenu

@package htmlobjects
@author Alexander Kuballa [akuballa@users.sourceforge.net]
@copyright Copyright (c) 2008 - 2012, Alexander Kuballa
@license BSD License (see LICENSE.TXT)
@version 1.1

filename: htmlobject.tabmenu.class.php

Attributes

top
attribute: form_action
access: public
default:
empty

url to process request

Form disabled if empty
@access public
@var string
top
attribute: tabcss
access: public
default:
current

Css class to highlight active tab

@access public
@var string
top
attribute: auto_tab
access: public
default:
true

Add a param to handle active tab
If set to true ['active'] will be ignored

@access public
@var bool
top
attribute: custom_tab
access: public
default:
empty

Add a custom string to tabs

@access public
@var string
top
attribute: floatbreaker
access: public
default:
true

Add a floatbreaking div between tab and box

@access public
@var string
top
attribute: message_param
access: public
default:
strMsg

Name of param to transport message to messagebox

@access public
@var string
top
attribute: message_filter
access: public
default:
array (
	array ( 'pattern' => '~</?script.+~i', 'replace' => ''),
	array ( 'pattern' => '~</?iframe.+~i', 'replace' => ''),
	array ( 'pattern' => '~</?object.+~i', 'replace' => ''),
	array ( 'pattern' => '~on.+=~i', 'replace' => ''),
	array ( 'pattern' => '~javascript~i', 'replace' => ''),
	array ( 'pattern' => '~://~', 'replace' => ':&frasl

Regex pattern for messagebox (XSS)

replace pattern with replace
@access public
@var array(array('pattern'=>'','replace'=>''));
top
attribute: message_time
access: public
default:
10000

Time to show messagebox in milliseconds (1/1000 sec.)

@access public
@var int
top
attribute: message_css
access: public
default:
msgBox

Css class for messagebox

@access public
@var string


Methods

top
function: __construct
params:
$htmlobject
$id = 'currenttab'

Constructor

@access public
@param htmlobject $htmlobject
@param string $id
top
function: init

Init tabs

@access public
top
function: add
params:
$data
$key = null

 Add content
 
 @access public
 @param array $data
 @param null $key not in use
 
 $html = new htmlobject('path_to_htmlobjects');
 $tab  = $html->tabmenu('id');
 
 $content               = array();
 $content[0]['label']   = 'some title';
 $content[0]['value']   = 'some content text';
 $content[0]['target']  = 'somefile.php';
 $content[0]['request'] = array('param1'=>'value1');
 $content[0]['onclick'] = false;
 $content[0]['active']  = false;
 $content[0]['hidden']  = false;
 
 $tab->add($content);
 
top
function: get_string

Get tabs as string

@access public
@param array $arr
@return string
top
function: get_current

Get array key of current element

@access public
@return string | null
top
function: __get_tabs
params:
$currenttab

Create tabs

@access private
@param string $currenttab
@return string
top
function: __get_js

Create JS toggle function

@access private
@return string
top
function: __get_messagebox

Create messagebox

@access private
@return string