Example:
~~~
echo Html::icon('pencil');
echo Html::icon('trash', ['style' => 'color: red; font-size: 2em']);
echo Html::icon('plus', ['class' => 'text-success']);
~~~
public static icon ( string $icon, array $options = [], string $prefix = 'glyphicon glyphicon-', string $tag = 'span' ) : string | ||
$icon | string | the bootstrap icon name without prefix (e.g. 'plus', 'pencil', 'trash') |
$options | array | HTML attributes / options for the icon container |
$prefix | string | the css class prefix - defaults to 'glyphicon glyphicon-' |
$tag | string | the icon container tag (usually 'span' or 'i') - defaults to 'span' |
리턴 | string |