PEAR::HTML::Progress example: HTMLPage ProgressBar Generator
Author: Laurent Laville

examples

# HTMLPage ProgressBar Generator

$Date: 2005/07/25 12:52:15 $

- Introduction
- Render options
- Ouput
- PHP source syntax highlight
- Play generator

## Introduction

This example requires :

- PEAR::HTML_Progress_Generator 1.2.2 or better (see source at line 12).

Be aware that:

- HTML_Progress_Generator has dependencies (HTML_QuickForm 3.2.4+, HTML_QuickForm_Controller 1.0.4+)

This example will run a ProgressBar Controller Wizard using the HTMLPage QF rendering. It will help you to create your own progress bar. You may even save the CSS and/or PHP code at end !

Few lines of code are necessary to run this generator. First we start a session at line 14 (to keep data), then we create a HTML_Progress_Generator instance at line 16 without options, and finally run the controller wizard itself at line 17.

Difference from previous example is to use the HTMLPage QF rendering as ActionDisplay (see line 12).

[Top]

## Render options

Uses defaults:

- Controller name = ProgressGenerator
- preview Action = ActionPreview => HTML/Progress/generator/preview.php
- process Action = ActionProcess => HTML/Progress/generator/process.php

Display render is overloaded by :

- display Action = ActionDisplay => HTML/Progress/generator/HTMLPage.php

As we still use the default class name 'ActionDisplay', no need to tell it with the second parameter of HTML_Progress_Generator class constructor.
See a script example of how to customize all actions (preview, display, process).

[Top]

## Output

### Screenshot

[Top]

## PHP source syntax highlight

Open source listing in a new window.

[Top]

## Play generator

Run the script.

[Top]