Class chofoteddy\wizard\Wizard
| Inheritance | chofoteddy\wizard\Wizard » yii\bootstrap\Widget |
|---|
Wizard renders a wizard bootstrap javascript component.
For example:
echo Wizard::widget([
'items' => [
// equivalent to the above
[
'label' => 'Collapsible Group Item #1',
'content' => 'Anim pariatur cliche...',
// open its content by default
'contentOptions' => ['class' => 'in']
],
// another wizard step
[
'label' => 'Collapsible Group Item #1',
'content' => 'Anim pariatur cliche...',
'contentOptions' => [...],
'options' => [...],
],
// short cut to label => content
'Finished' => 'Thanks for filling your information'
]
]);
See also http://vadimg.com/twitter-bootstrap-wizard-example/.
Public Properties
| Property | Type | Description | Defined By |
|---|---|---|---|
| $encodeLabels | boolean | Whether the labels for header items should be HTML-encoded. | chofoteddy\wizard\Wizard |
| $headerOptions | array | List of HTML attributes for the header container tags. | chofoteddy\wizard\Wizard |
| $itemOptions | array | List of HTML attributes for the item container tags. | chofoteddy\wizard\Wizard |
| $items | array | List of groups in the wizard widget. | chofoteddy\wizard\Wizard |
| $labelOptions | array | List of HTML attributes for the item container tags. | chofoteddy\wizard\Wizard |
| $linkOptions | array | List of HTML attributes for the tab header link tags. | chofoteddy\wizard\Wizard |
| $navOptions | array | Options to get passed to the \yii\bootstrap\Nav widget | chofoteddy\wizard\Wizard |
Public Methods
| Method | Description | Defined By |
|---|---|---|
| init() | chofoteddy\wizard\Wizard | |
| renderItems() | Renders wizard items as specified on $items. | chofoteddy\wizard\Wizard |
| run() | chofoteddy\wizard\Wizard |
Property Details
Whether the labels for header items should be HTML-encoded.
List of HTML attributes for the header container tags. The following special options are recognized:
- tag: string, defaults to "ul", the tag name of the item container tags.
See also \yii\helpers\Html::renderTagAttributes() for details on how attributes are being rendered.
List of HTML attributes for the item container tags. This will be overwritten by the "options" set in individual $items. The following special options are recognized:
- tag: string, defaults to "div", the tag name of the item container tags.
See also \yii\helpers\Html::renderTagAttributes() for details on how attributes are being rendered.
List of groups in the wizard widget. Each array element represents a single group with the following structure:
- label: string, required, the group header label.
- url: string|array, optional, an external URL. When this is specified, clicking on this tab will bring
- encode: boolean, optional, whether this label should be HTML-encoded.
This param will override global
$this->encodeLabelsparam. - content: array|string|object, required, the content (HTML) of the group
- options: array, optional, the HTML attributes of the group
- contentOptions: optional, the HTML attributes of the group's content
- visible: boolean, optional, whether the item should be visible or not. Defaults to true.
List of HTML attributes for the item container tags. This will be overwritten by the "options" set in individual $items. The following special options are recognized:
- tag: string, defaults to "li", the tag name of the item container tags.
See also \yii\helpers\Html::renderTagAttributes() for details on how attributes are being rendered.
List of HTML attributes for the tab header link tags. This will be overwritten by the "linkOptions" set in individual $items.
See also \yii\helpers\Html::renderTagAttributes() for details on how attributes are being rendered.
Options to get passed to the \yii\bootstrap\Nav widget
See also \yii\bootstrap\Widget::$options for details.