HTML_Progress2 : The Definitive Guide |
Without any change, we can get a decent progress generator tabbed wizard such as :
Color, font, size and position are defined by default in stylesheet default.css you can find into PEAR HTML_Progress2 data directory.
As you can see in source code below, there are no difficulty.
HTML_Progress2_Generator does not start a session automatically, you should explicitly call session_start before instantiating the controller class. A session is required to pass data between the tabbed multi-pages generator wizard.
Without any arguments, all defaults are applied on HTML_Progress2_Generator new instance construction.
Name of generator tabbed wizard (QuickForm Controller). Default is ProgressGenerator
List of renderer options. Default are
Note | |
---|---|
Since version 2.1.0, you can use the singleton pattern
|
Catch all user actions (next, back, jump, apply, process) and display controller wizard contents.
Now we have seen basic usage, we will try to change the skin with only a new stylesheet.
This line allow to add/activate the interactive debugging tools that can give you informations on: progress meter, wizard controller forms data, list of included files (see get_included_files), list of declared classes (see get_declared_classes), and list of generator actions defined.
$css defines the location of the new stylesheet to apply. This file will give a grey-orange look and feel such as :
Note | |
---|---|
You may find this file into examples/generator of PEAR HTML_Progress2 docs directory. |
This line overload the default display action set during the class instantiation.
Important | |
---|---|
We are still using the QF default renderer, and the ActionDisplay class (see HTML/Progress2/Generator/Default.php). |
We have also possibility to get and set stylesheet with methods
ActionDisplay::getStyleSheet()
,
ActionDisplay::setStyleSheet()
like this :
HTML_Progress2 : The Definitive Guide | v 2.4.0 : April 20, 2007 |