public static function Micon::renderIcon in Micon 2.x
Same name and namespace in other branches
- 8 src/TwigExtension/Micon.php \Drupal\micon\TwigExtension\Micon::renderIcon()
Render the icon.
Parameters
string $icon: The icon_id of the icon to render.
Return value
mixed[] A render array.
File
- src/
TwigExtension/ Micon.php, line 41
Class
- Micon
- A class providing Micon Twig extensions.
Namespace
Drupal\micon\TwigExtensionCode
public static function renderIcon($icon) {
$build = [
'#theme' => 'micon_icon',
'#icon' => $icon,
];
return $build;
}