PHP Trait 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.
Afficher le fichier
Open project: yiisoft/yii2-bootstrap
Méthodes publiques
Свойство |
Type |
Description |
|
$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"). |
|
Méthodes publiques
Méthode |
Description |
|
getView ( ) : View |
|
|
init ( ) |
Initializes the widget. |
|
Méthodes protégées
Méthode |
Description |
|
registerClientEvents ( ) |
Registers JS event handlers that are listed in [[clientEvents]]. |
|
registerPlugin ( string $name ) |
Registers a specific Bootstrap plugin and the related events |
|
Method Details
getView()
abstract public méthode
abstract public getView ( ) : View |
Résultat |
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()
protected méthode
Registers JS event handlers that are listed in [[clientEvents]].
registerPlugin()
protected méthode
Registers a specific Bootstrap plugin and the related events
Property Details
$clientEvents public_oe property
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 public_oe property
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").