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.
/** * Executes the widget. * * @return string the rendered markup. */ public function run() { return parent::run(); }
/** * Executes the widget. * @return string the result of widget execution to be outputted. * @see Button|Button * @uses Button|Button * @uses [[renderItems()]] */ public function run() { $html = Html::beginTag('div', $this->options); // Visible button $html .= Button::widget(['tagName' => $this->buttonTagName, 'label' => $this->buttonLabel, 'encodeLabel' => $this->buttonEncodeLabel, 'options' => $this->buttonOptions, 'icon' => $this->buttonIcon]); $html .= $this->renderItems(); $html .= Html::endTag('div'); return $html; }