Class thoulah\fontawesome\IconWidget4

Inheritancethoulah\fontawesome\IconWidget4 » yii\bootstrap4\Widget

Provides an easy way to access icons as a widget.

use thoulah\fontawesome\IconWidget4 as IconWidget;
echo IconWidget::widget(['name' => 'at']);

echo IconWidget::widget([
    'name' => 'github',
    'options' => [
        'style' => 'brands',
        'fill' => '#003865'
    ]
]);

echo IconWidget::widget([
    'name' => 'font-awesome',
    'options' => [
        'class' => 'yourClass',
        'style' => 'brands'
    ],
]);

Public Properties

Hide inherited properties

PropertyTypeDescriptionDefined By
$defaults array|null Overrides of the default settings thoulah\fontawesome\IconWidget4
$name string Name of the icon thoulah\fontawesome\IconWidget4
$options array Icon settings thoulah\fontawesome\IconWidget4

Public Methods

Hide inherited methods

MethodDescriptionDefined By
run() Executes the widget. thoulah\fontawesome\IconWidget4

Property Details

$defaults public static property

Overrides of the default settings

public static array|null $defaults null
$name public property

Name of the icon

public string $name null
$options public property

Icon settings

public array $options = []

Method Details

run() public method

Executes the widget.

public string run ( )
return string

The icon