Class yii\bootstrap4\Button
Inheritance | yii\bootstrap4\Button » yii\bootstrap4\Widget » yii\base\Widget |
---|---|
Uses Traits | yii\bootstrap4\BootstrapWidgetTrait |
Button renders a bootstrap button.
For example,
echo Button::widget([
'label' => 'Action',
'options' => ['class' => 'btn-lg'],
]);
Public Properties
Property | Type | Description | Defined By |
---|---|---|---|
$clientEvents | array | The event handlers for the underlying Bootstrap JS plugin. | yii\bootstrap4\BootstrapWidgetTrait |
$clientOptions | array | The options for the underlying Bootstrap JS plugin. | yii\bootstrap4\BootstrapWidgetTrait |
$encodeLabel | boolean | Whether the label should be HTML-encoded. | yii\bootstrap4\Button |
$label | string | The button label | yii\bootstrap4\Button |
$options | array | The HTML attributes for the widget container tag. | yii\bootstrap4\Widget |
$tagName | string | The tag to use to render the button | yii\bootstrap4\Button |
Public Methods
Method | Description | Defined By |
---|---|---|
getView() | yii\bootstrap4\BootstrapWidgetTrait | |
init() | Initializes the widget. | yii\bootstrap4\Button |
run() | yii\bootstrap4\Button |
Protected Methods
Method | Description | Defined By |
---|---|---|
registerClientEvents() | Registers JS event handlers that are listed in $clientEvents. | yii\bootstrap4\BootstrapWidgetTrait |
registerPlugin() | Registers a specific Bootstrap plugin and the related events | yii\bootstrap4\BootstrapWidgetTrait |