PHP Класс macgyer\yii2materializecss\widgets\Button

There are three main button types described in Materialize. - the raised button is a standard button that signifies actions and seek to give depth to a mostly flat page - the floating circular action button is meant for very important functions - flat buttons are usually used within elements that already have depth like cards or modals The button can be displayed with an optional icon. This class uses the [[Icon|Icon]] widget to show icons.
См. также: http://materializecss.com/buttons.html
Автор: Christoph Erdmann ([email protected])
Наследование: extends macgyer\yii2materializecss\lib\BaseWidget
Показать файл Открыть проект Примеры использования класса

Открытые свойства

Свойство Тип Описание
$disabled whether the button shall be disabled.
$encodeLabel whether the label should be HTML-encoded.
$icon the options for the optional icon. To specify an icon you can use the following parameters: php [ 'name' => 'name of the icon', // required 'position' => 'position of the icon', // optional, 'left' or 'right', defaults to 'left' 'options' => 'the HTML attributes for the img', // optional ]
$label the label on the button. If you do not want a label text to be rendered, set this options to "false".
$large whether the button shall be of larger size.
$tagName the tag used to render the button.
$type the type of button to be rendered. The following options are supported: - raised - floating - flat This property defaults to "raised". To set the type, use the corresponding TYPE_* constant of this class. If no type from this range is given, the button will be of the "raised" type.

Открытые методы

Метод Описание
init ( ) Initializes the widget.
run ( ) : string Executes the widget.

Защищенные методы

Метод Описание
renderIcon ( ) : string Renders an icon.

Описание методов

init() публичный Метод

Initializes the widget.
public init ( )

renderIcon() защищенный Метод

Renders an icon.
См. также: Icon::run
protected renderIcon ( ) : string
Результат string the rendered icon

run() публичный Метод

Executes the widget.
public run ( ) : string
Результат string the result of widget execution to be outputted.

Описание свойств

$disabled публичное свойство

whether the button shall be disabled.
public $disabled

$encodeLabel публичное свойство

whether the label should be HTML-encoded.
public $encodeLabel

$icon публичное свойство

the options for the optional icon. To specify an icon you can use the following parameters: php [ 'name' => 'name of the icon', // required 'position' => 'position of the icon', // optional, 'left' or 'right', defaults to 'left' 'options' => 'the HTML attributes for the img', // optional ]
public $icon

$label публичное свойство

the label on the button. If you do not want a label text to be rendered, set this options to "false".
public $label

$large публичное свойство

whether the button shall be of larger size.
public $large

$tagName публичное свойство

the tag used to render the button.
public $tagName

$type публичное свойство

the type of button to be rendered. The following options are supported: - raised - floating - flat This property defaults to "raised". To set the type, use the corresponding TYPE_* constant of this class. If no type from this range is given, the button will be of the "raised" type.
public $type