Свойство | Type | Description | |
---|---|---|---|
$dropdownClass | name of a class to use for rendering dropdowns withing this widget. Defaults to Dropdown. | ||
$encodeLabels | whether the labels for header items should be HTML-encoded. | ||
$headerOptions | list of HTML attributes for the header container tags. This will be overwritten by the "headerOptions" set in individual [[items]]. | ||
$itemOptions | 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. | ||
$items | list of tabs in the tabs widget. Each array element represents a single tab with the following structure: - label: string, required, the tab header label. - encode: boolean, optional, whether this label should be HTML-encoded. This param will override global $this->encodeLabels param. - headerOptions: array, optional, the HTML attributes of the tab header. - linkOptions: array, optional, the HTML attributes of the tab header link tags. - content: string, optional, the content (HTML) of the tab pane. - url: string, optional, an external URL. When this is specified, clicking on this tab will bring the browser to this URL. This option is available since version 2.0.4. - options: array, optional, the HTML attributes of the tab pane container. - active: boolean, optional, whether this item tab header and pane should be active. If no item is marked as 'active' explicitly - the first one will be activated. - visible: boolean, optional, whether the item tab header and pane should be visible or not. Defaults to true. - items: array, optional, can be used instead of content to specify a dropdown items configuration array. Each item can hold three extra keys, besides the above ones: * active: boolean, optional, whether the item tab header and pane should be visible or not. * content: string, required if items is not set. The content (HTML) of the tab pane. * contentOptions: optional, array, the HTML attributes of the tab content container. | ||
$linkOptions | list of HTML attributes for the tab header link tags. This will be overwritten by the "linkOptions" set in individual [[items]]. | ||
$navType | specifies the Bootstrap tab styling. | ||
$renderTabContent | whether to render the tab-content container and its content. You may set this property to be false so that you can manually render tab-content yourself in case your tab contents are complex. |
Méthode | Description | |
---|---|---|
init ( ) | Initializes the widget. | |
run ( ) | Renders the widget. |
Méthode | Description | |
---|---|---|
hasActiveTab ( ) : boolean | ||
renderDropdown ( string $itemNumber, array &$items, array &$panes ) : boolean | Normalizes dropdown item options by removing tab specific keys content and contentOptions, and also configure panes accordingly. | |
renderItems ( ) : string | Renders tab items as specified on [[items]]. |
protected hasActiveTab ( ) : boolean | ||
Résultat | boolean | if there's active tab defined |
protected renderItems ( ) : string | ||
Résultat | string | the rendering result. |
public $dropdownClass |
public $encodeLabels |
public $headerOptions |
public $itemOptions |
public $items |
public $linkOptions |