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.
Author: Christoph Erdmann ([email protected])
Datei anzeigen 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 Description
registerClientEvents ( ) Registers JS event handlers that are listed in [[clientEvents]].
registerPlugin ( string $name, string | null $selector = null ) Registers a specific Materialize plugin and the related events.

Method Details

init() public method

This method will register the MaterializeAsset bundle. When overriding this method, make sure to call the parent implementation first.
public init ( )

registerClientEvents() protected method

Registers JS event handlers that are listed in [[clientEvents]].
protected registerClientEvents ( )

registerPlugin() protected method

Registers a specific Materialize plugin and the related events.
protected registerPlugin ( string $name, string | null $selector = null )
$name string the name of the Materialize plugin
$selector string | null the name of the selector the plugin shall be attached to

Property Details

$clientEvents public_oe property

the event handlers for the underlying Materialize JS plugin. Please refer to the corresponding Materialize documentation web page.
See also: http://materializecss.com/
public $clientEvents

$clientOptions public_oe property

the options for the underlying Materialize JS plugin. Please refer to the corresponding Materialize documentation web page.
See also: http://materializecss.com/
public $clientOptions