Skip to content

Latest commit

 

History

History
106 lines (74 loc) · 1.85 KB

Tabbar-Documentation.pod

File metadata and controls

106 lines (74 loc) · 1.85 KB

Class Tabbar Documentation

Description

Class Tabbar - XML Generator for DHTMLX

construct

$tabbar = new Tabbar( set encoding, default utf-8 )

$tabbar = new Tabbar;

or

$tabbar = new Tabbar('iso-8859-1');

tab

$tabbar->tab( array( 'key attribute' => 'value attribute' ) )

$tabbar->tab(
    array(
        "id" => "tab1",
        "text" => "Tab 1",
        "content" => "content of tab"
    )
);

header

$tabbar->header()

$tabbar->header();

return

header("Content-type: application/xml; charset=utf-8");

result

$tabbar->result()

echo $tabbar->result();

Print XML

Examples

Example 1

<?php
include_once 'DHX.php';

$tabbar = new Tabbar;

$tabbar->tab(
    array(
        "id" => "tab1",
        "text" => "Tab 1"
    ),
    array(
        "id" => "tab2",
        "text" => "Tab 2",
        "content" => "content of tab"
    ),
    array(
        "id" => "tab3",
        "text" => "Tab 3",
        "content" => "content of tab"
    )
);

$tabbar->header();
echo $tabbar->result();
?>

Result

<?xml version="1.0" encoding="utf-8"?>
<tabbar>
    <row>
        <tab id="tab1">Tab 1</tab>
        <tab id="tab2">
            Tab 2
            <content>
                <![CDATA[ content of tab ]]>
            </content>
        </tab>
        <tab id="tab3">
            Tab 3
            <content>
                <![CDATA[ content of tab ]]>
            </content>
        </tab>
    </row>
</tabbar>

Author

Lucas Tiago de Moraes

Support

Group DHTMLX Facebook