PHP Class macgyer\yii2materializecss\widgets\Icon

Please note that the Materialize icons are shipped in a separate font file. This font file is automatically registered by the [[\macgyer\yii2materializecss\assets\MaterializeAsset|MaterializeAsset]]. If you do not load the default [[\macgyer\yii2materializecss\assets\MaterializeAsset|MaterializeAsset]] make sure to at least load [[\macgyer\yii2materializecss\assets\MaterializeFontAsset|MaterializeFontAsset]] (or another source providing the font file) to correctly display the icons.
See also: http://materializecss.com/icons.html
Author: Christoph Erdmann ([email protected])
Inheritance: extends macgyer\yii2materializecss\lib\BaseWidget
Show file Open project: macgyer/yii2-materializecss Class Usage Examples

Public Properties

Property Type Description
$name the name of the icon.
$options the HTML options for the icon tag. The following special options are recognized: - tag: string, defaults to "i"
$position the position of the icon. Currently "left" and "right" are natively supported by Materialize, but you can set this property to a custom string which will be added to the HTML class attribute and thus can be individually styled. The default icon position is "left".

Public Methods

Method Description
init ( ) Initializes the widget.
run ( ) : string Executes the widget.

Method Details

init() public method

Initializes the widget.
public init ( )

run() public method

Executes the widget.
public run ( ) : string
return string the result of widget execution to be outputted.

Property Details

$name public property

the name of the icon.
See also: http://materializecss.com/icons.html
public $name

$options public property

the HTML options for the icon tag. The following special options are recognized: - tag: string, defaults to "i"
See also: [yii\helpers\BaseHtml::renderTagAttributes()](http://www.yiiframework.com/doc-2.0/yii-helpers-basehtml.html#renderTagAttributes()-detail) for details on how attributes are being rendered.
public $options

$position public property

the position of the icon. Currently "left" and "right" are natively supported by Materialize, but you can set this property to a custom string which will be added to the HTML class attribute and thus can be individually styled. The default icon position is "left".
public $position