src/helpers/Html.php
public static function buttonFa ($text, $fa, $options = [])
		{
			$class = 'fa fa-' . $fa;
			if (!empty(trim($text)))
				$class .= ' margin';

			$icon = self::tag('i', '', [ 'class' => $class ]);
			if (!isset($options[ 'title' ]))
				$options[ 'title' ] = $text;
			if (isset($options[ 'raw' ]) and $options[ 'raw' ] == true)
			{
				unset($options[ 'raw' ]);

				return parent::button($icon . $text, $options);
			}
			else
			{
				unset($options[ 'raw' ]);

				return parent::button($icon . Yii::t('app', $text), $options);
			}
		}
public static function buttonFa ($text, $fa, $options = [])
		{
			$class = 'fa fa-' . $fa;
			if (!empty(trim($text)))
				$class .= ' margin';

			$icon = self::tag('i', '', [ 'class' => $class ]);
			if (!isset($options[ 'title' ]))
				$options[ 'title' ] = $text;
			if (isset($options[ 'raw' ]) and $options[ 'raw' ] == true)
			{
				unset($options[ 'raw' ]);

				return parent::button($icon . $text, $options);
			}
			else
			{
				unset($options[ 'raw' ]);

				return parent::button($icon . Yii::t('app', $text), $options);
			}
		}
public static function buttonFa ( $ text , $ fa , $ options = [ ] ) { $ class = 'fa fa-' . $ fa ; if ( ! empty ( trim ( $ text ) ) ) $ class .= ' margin' ; $ icon = self :: tag ( 'i' , '' , [ 'class' => $ class ] ) ; if ( ! isset ( $ options [ 'title' ] ) ) $ options [ 'title' ] = $ text ; if ( isset ( $ options [ 'raw' ] ) and $ options [ 'raw' ] == true ) { unset ( $ options [ 'raw' ] ) ; return parent :: button ( $ icon . $ text , $ options ) ; } else { unset ( $ options [ 'raw' ] ) ; return parent :: button ( $ icon . Yii :: t ( 'app' , $ text ) , $ options ) ; } }
Creates button with FontAwesome icon.

```php
Html::buttonFa('Save', 'save', [ 'raw' => true ]);
// <button type="button"><i class="fa fa-save margin"></i>Save</button>
```

@param string $text Button text.
@param string $fa Icon name.
@param array  $options Additional options.
@return string
Creates button with FontAwesome icon .