PHP Trait macgyer\yii2materializecss\lib\MaterializeWidgetTrait
Please note: a class using this trait must declare a public field named
options with the array default value:
php
class MyWidget extends \yii\base\Widget
{
use MaterializeWidgetTrait;
public $options = [];
}
This field is not present in the trait in order to avoid possible PHP Fatal error on definition conflict.
Show file
Open project: macgyer/yii2-materializecss
Public Properties
Property |
Type |
Description |
|
$clientEvents |
|
the event handlers for the underlying Materialize JS plugin.
Please refer to the corresponding Materialize documentation web page. |
|
$clientOptions |
|
the options for the underlying Materialize JS plugin.
Please refer to the corresponding Materialize documentation web page. |
|
Public Methods
Method |
Description |
|
init ( ) |
Initializes the widget. |
|
Protected Methods
Method Details
This method will register the MaterializeAsset bundle. When overriding this method,
make sure to call the parent implementation first.
registerClientEvents()
protected method
Registers JS event handlers that are listed in [[clientEvents]].
registerPlugin()
protected method
Registers a specific Materialize plugin and the related events.
Property Details
$clientEvents public property
the event handlers for the underlying Materialize JS plugin.
Please refer to the corresponding Materialize documentation web page.
$clientOptions public property
the options for the underlying Materialize JS plugin.
Please refer to the corresponding Materialize documentation web page.