Skip to content

Latest commit

 

History

History
120 lines (78 loc) · 2.28 KB

Accordion-Documentation.pod

File metadata and controls

120 lines (78 loc) · 2.28 KB

Class Accordion Documentation

Description

Class Accordion - XML Generator for DHTMLX

construct

$accordion = new Accordion( set encoding, default utf-8 )

$accordion = new Accordion;

or

$accordion = new Accordion('iso-8859-1');

attributes

skin

$accordion->skin = 'dhx_skyblue'; // default skin dhx_skyblue

mode

$accordion->mode = 'single'; // default single

iconsPath

$accordion->iconsPath = '../common/'; // default path '../common/'

openEffect

$accordion->openEffect = 'false'; // default false

cell

$accordion->cell( array( 'key attribute' => 'value attribute' ) )

$accordion->cell(
    array(
        "id" => "a1", 
        "height" => "120",
        "text" => "Main Page"
    )
);

header

$accordion->header()

$accordion->header();

return

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

result

$accordion->result()

echo $accordion->result();

Print XML

Examples

Example 1

<?php
include_once 'DHX.php';

$accordion = new Accordion;

$accordion->cell(
    array(
        "id" => "a1", 
        "height" => "120",
        "text" => "Main Page"
    ),
    array(
        "id" => "a2", 
        "open" => "true",
        "text" => "Site Navigation"
    ),
    array(
        "id" => "a3", 
        "icon" => "icon2.gif",
        "text" => "Support &amp; Feedback"
    ),
    array(
        "id" => "a4", 
        "icon" => "icon3.gif",
        "text" => "Comments"
    )
);

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

Result

<?xml version="1.0" encoding="utf-8"?>
<accordion skin="dhx_skyblue" mode="single" iconsPath="../common/" openEffect="false">
    <cell id="a1" height="120">Main Page</cell>
    <cell id="a2" open="true">Site Navigation</cell>
    <cell id="a3" icon="icon2.gif">Support &amp; Feedback</cell>
    <cell id="a4" icon="icon3.gif">Comments</cell>
</accordion>

Author

Lucas Tiago de Moraes

Support

Group DHTMLX Facebook