IconData ​
- Type
- Class
- Namespace
- craft\fields\data
- Inherits
- craft\fields\data\IconData
- Implements
- craft\base\Serializable
- Since
- 5.8.0
Class IconData
Public Properties ​
| Property | Description |
|---|---|
| name | |
| set | |
| styles |
name ​
- Default value
null
set ​
- Default value
null
styles ​
- Default value
null
Public Methods ​
| Method | Description |
|---|---|
| __construct() | Constructor |
| __toString() | |
| getKeywords() | Returns the icon’s search keywords. |
| getSvg() | Returns the icon’s SVG markup. |
| serialize() | Returns the object’s serialized value. |
__construct() ​
Constructor
Arguments ​
$name(string) – The icon name$styles(string[]) – The Font Awesome styles the icon is available in$set(string, null) – The handle of the custom icon set the icon belongs to, ornullfor Font Awesome icons
__toString() ​
Returns ​
getKeywords() ​
- Since
- 5.12.0
Returns the icon’s search keywords.
Returns ​
string[]
getSvg() ​
- Since
- 5.12.0
Returns the icon’s SVG markup.
Returns ​
string, null – The SVG markup, or null if the icon doesn’t exist
serialize() ​
Returns the object’s serialized value.
Returns ​
mixed – The serialized value