PHP Трейт yii\bootstrap\BootstrapWidgetTrait
Note: class, which uses this trait must declare public field named
options with the array default value:
php
class MyWidget extends \yii\base\Widget
{
use BootstrapWidgetTrait;
public $options = [];
}
This field is not present in the trait in order to avoid possible PHP Fatal error on definition conflict.
Показать файл
Открыть проект
Открытые свойства
Свойство |
Тип |
Описание |
|
$clientEvents |
|
the event handlers for the underlying Bootstrap JS plugin.
Please refer to the corresponding Bootstrap plugin Web page for possible events.
For example, this page shows
how to use the "Modal" plugin and the supported events (e.g. "shown"). |
|
$clientOptions |
|
the options for the underlying Bootstrap JS plugin.
Please refer to the corresponding Bootstrap plugin Web page for possible options.
For example, this page shows
how to use the "Modal" plugin and the supported options (e.g. "remote"). |
|
Открытые методы
Метод |
Описание |
|
getView ( ) : View |
|
|
init ( ) |
Initializes the widget. |
|
Защищенные методы
Описание методов
getView()
абстрактный публичный метод
abstract public getView ( ) : View |
Результат |
yii\web\View |
the view object that can be used to render views or view files. |
This method will register the bootstrap asset bundle. If you override this method,
make sure you call the parent implementation first.
registerClientEvents()
защищенный метод
Registers JS event handlers that are listed in [[clientEvents]].
registerPlugin()
защищенный метод
Registers a specific Bootstrap plugin and the related events
Описание свойств
$clientEvents публичное свойство
the event handlers for the underlying Bootstrap JS plugin.
Please refer to the corresponding Bootstrap plugin Web page for possible events.
For example,
this page shows
how to use the "Modal" plugin and the supported events (e.g. "shown").
$clientOptions публичное свойство
the options for the underlying Bootstrap JS plugin.
Please refer to the corresponding Bootstrap plugin Web page for possible options.
For example,
this page shows
how to use the "Modal" plugin and the supported options (e.g. "remote").