IconSet
API reference › Bootstrap 6 › IconSet
Provides the default SVG icons rendered by the widgets and lets applications replace them through the DI container.
Widgets resolve the set with Yii::createObject(IconSet::class), so a container.definitions entry for this class
replaces any icon globally. Every property holds its bundled default until the configuration overrides it.
See also: https://developer.mozilla.org/en-US/docs/Web/SVG/Element/svg.
Properties
Section titled “Properties”| Property | Type | Description | Defined by |
|---|---|---|---|
$accordionChevron | string|Stringable | Chevron rendered after each Accordion item label; receives the accordion-icon class. | IconSet |
$comboboxCaret | string|Stringable | Caret rendered inside the Combobox toggle; receives the combobox-caret class. | IconSet |
$menuItemCheck | string|Stringable | Check mark rendered inside each Combobox item; receives the menu-item-check class. | IconSet |
Methods
Section titled “Methods”| Method | Description | Defined by |
|---|---|---|
__construct() | Builds the bundled defaults before the configuration replaces any of them. | IconSet |
__call() | Calls the named method which is not a class method. | yii\ |
__get() | Returns the value of an object property. | yii\ |
__isset() | Checks if a property is set, i.e. defined and not null. | yii\ |
__set() | Sets value of an object property. | yii\ |
__unset() | Sets an object property to null. | yii\ |
canGetProperty() | Returns a value indicating whether a property can be read. | yii\ |
canSetProperty() | Returns a value indicating whether a property can be set. | yii\ |
className() static | Returns the fully qualified name of this class. | yii\ |
hasMethod() | Returns a value indicating whether a method is defined. | yii\ |
hasProperty() | Returns a value indicating whether a property is defined. | yii\ |
init() | Initializes the object. | yii\ |
render() static | Returns the markup of an icon with its structural CSS class. | IconSet |
Method details
Section titled “Method details”__construct()
Section titled “__construct() ”public function __construct(array<string, mixed> $config = [])Builds the bundled defaults before the configuration replaces any of them.
Parameters
| Parameter | Type | Description |
|---|---|---|
$config | array<string, | Name-value pairs that override the default icons. |
render()
Section titled “render() ”public static function render(string|Stringable $icon, string $class): stringReturns the markup of an icon with its structural CSS class.
A \UIAwesome\Html\Svg\Svg instance receives $class appended to its own classes (html-svg skips a class it already carries).
Any other value is cast to string verbatim, so plain markup and other Stringable objects must already carry
the class.
Parameters
| Parameter | Type | Description |
|---|---|---|
$icon | string|Stringable | Icon to render. |
$class | string | Structural CSS class the Bootstrap stylesheet targets, for example accordion-icon. |
Returns
string