# Font Awesome

# TC\ComponentLibrary\Util\FontAwesome

# getIconDataFromClassesString

Parses a CSS classes string and returns Font Awesome icon information.

public static function getIconDataFromClassesString(string $classesString): array

# Arguments

Argument Type Description
classesString string A CSS string to parse.

# Return data

Key Type Description
is_brand bool If true, icon is belongs to the Brands category.
unicode string The Unicode icon code.
label string Icon label.
icon string Icon label from CSS class name.
weight int The value for the icon's font-weight property.
style_class string Icon style class.
extra_classes array Classes not used for parsing.

# classesStringToLess

Parses CSS classes string, gets Font Awesome icon information, and returns the LESS rules for the icon.

public static function classesStringToLess(string $classesString): string

# Arguments

Argument Type Description
classesString string A CSS string to parse.

# Return data.

If parsed successfully, a string containing .m-faBase(), .m-faContent() and font-weight LESS rules will be returned.

# Templater functions

# tc_fa_classes_to_less

See TC\ComponentLibrary\Util\FontAwesome::classesStringToLess.