TbModal
extends CWidget
in package
Bootstrap modal widget.
Table of Contents
Properties
- $backdrop : mixed
- $buttonOptions : array<string|int, mixed>
- $closeText : string
- $content : string
- $fade : bool
- $footer : string
- $header : string
- $htmlOptions : array<string|int, mixed>
- $keyboard : bool
- $onHidden : string
- $onHide : string
- $onShow : string
- $onShown : string
- $remote : mixed
- $show : bool
- $size : string
- $events : array<string|int, string>
- $options : array<string|int, mixed>
Methods
- init() : mixed
- Widget's initialization method
- initEvents() : mixed
- Initialize events if any
- initOptions() : mixed
- Initialize plugin options.
- registerClientScript() : mixed
- Registers necessary client scripts.
- renderButton() : mixed
- Renders the button
- run() : mixed
- Widget's run method
Properties
$backdrop
public
mixed
$backdrop
= \true
includes a modal-backdrop element. Alternatively, specify static
for a backdrop which doesn't close
the modal on click.
$buttonOptions
public
array<string|int, mixed>
$buttonOptions
= array()
The additional HTML attributes of the button that will show the modal. If empty array, only the markup of the modal will be rendered on the page, so users can easily call the modal manually with their own scripts. The following special attributes are available:
- label: string, the label of the button
For available options of the button trigger, see http://twitter.github.com/bootstrap/javascript.html#modals.
$closeText
public
string
$closeText
= \TbHtml::CLOSE_TEXT
$content
public
string
$content
body of modal
$fade
public
bool
$fade
= \true
indicates whether the modal should use transitions. Defaults to 'true'.
$footer
public
string
$footer
footer content
$header
public
string
$header
header content
$htmlOptions
public
array<string|int, mixed>
$htmlOptions
= array()
the HTML options for the view container tag.
$keyboard
public
bool
$keyboard
= \true
closes the modal when escape key is pressed.
$onHidden
public
string
$onHidden
a javascript function that will be invoked when the modal has finished being hidden from the user (will wait for css transitions to complete).
$onHide
public
string
$onHide
a javascript function that will be invoked immediately when the hide instance method has been called.
$onShow
public
string
$onShow
a javascript function that will be invoked immediately when the show
instance method is called.
$onShown
public
string
$onShown
a javascript function that will be invoked when the modal has been made visible to the user (will wait for css transitions to complete).
$remote
public
mixed
$remote
the remote url. If a remote url is provided, content will be loaded via jQuery's load method and injected into the .modal-body of the modal.
$show
public
bool
$show
= \false
shows the modal when initialized.
$size
public
string
$size
= \TbHtml::MODAL_SIZE_DEFAULT
sets what size the modal should have based on the modal-sm or modal-lg classes mentioned in bootstrap docs since 3.1.1. Defaults to '', meaning that no new class will be added.
$events
protected
array<string|int, string>
$events
= array()
the Javascript event handlers.
$options
protected
array<string|int, mixed>
$options
= array()
the plugin options.
Methods
init()
Widget's initialization method
public
init() : mixed
initEvents()
Initialize events if any
public
initEvents() : mixed
initOptions()
Initialize plugin options.
public
initOptions() : mixed
Important: The display of the button overrides the initialization of the modal bootstrap widget.
registerClientScript()
Registers necessary client scripts.
public
registerClientScript() : mixed
renderButton()
Renders the button
public
renderButton() : mixed
run()
Widget's run method
public
run() : mixed