PHP Class macgyer\yii2materializecss\widgets\Spinner

When displaying a spinner you can choose to let the colors change with every rotation.
Since: 1.0.2
Author: Christoph Erdmann ([email protected])
Inheritance: extends macgyer\yii2materializecss\lib\BaseWidget
Show file Open project: macgyer/yii2-materializecss

Public Properties

Property Type Description
$color the color of the spinner. The following options are supported: - blue - red - yellow - green To set the color, use the corresponding COLOR_* constant of this class. If no color from this range is given, the slider color will be the Materialize default "petrol" color (#26a69a).
$flashColors whether to show alternating colors in spinner. If this is set to "true" the spinner will continously alternate its colors between blue, red, yellow and green.
$options the HTML attributes for the widget container tag.
$size the size of the spinner. The following options are supported: - small - medium - big Defaults to "medium". To set the size, use the corresponding SIZE_* constant of this class.
$spinnerOptions the HTML attributes for the spinner. If [[flashColors]] is set to "true" these options will be applied to all spinner simultaneously.

Public Methods

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

Protected Methods

Method Description
renderSpinner ( ) : string Renders a single spinner.

Method Details

init() public method

Initializes the widget.
public init ( )

renderSpinner() protected method

Renders a single spinner.
protected renderSpinner ( ) : string
return string

run() public method

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

Property Details

$color public property

the color of the spinner. The following options are supported: - blue - red - yellow - green To set the color, use the corresponding COLOR_* constant of this class. If no color from this range is given, the slider color will be the Materialize default "petrol" color (#26a69a).
public $color

$flashColors public property

whether to show alternating colors in spinner. If this is set to "true" the spinner will continously alternate its colors between blue, red, yellow and green.
See also: http://materializecss.com/preloader.html
public $flashColors

$options public property

the HTML attributes for the widget container tag.
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

$size public property

the size of the spinner. The following options are supported: - small - medium - big Defaults to "medium". To set the size, use the corresponding SIZE_* constant of this class.
public $size

$spinnerOptions public property

the HTML attributes for the spinner. If [[flashColors]] is set to "true" these options will be applied to all spinner simultaneously.
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 $spinnerOptions