Icon plugin to present most popular icons sets in SVG format for Flextype.
This plugin currently contains 3 primary SVG icon sets:
/project/plugins/icon
/project/plugins/icon
Key | Value | Description |
---|---|---|
enabled | true | true or false to disable the plugin |
priority | 1 | Icon plugin priority |
Global function icon()
/**
* Get SVG icon from specific icons set.
*
* @param string|null $name Icon name.
* @param string|null $set Icon set:
* - tabler
* - bootstrap
* - fontawesome|brands,
* - fontawesome|regular
* - fontawesome|solid
* @param string|null $class CSS Class.
*
* @return string
*/
function icon(?string $name = null, ?string $set = 'fontawesome|solid', ?string $class = null): string
Display icon in the twig templates
{{ icon('apple', 'fontawesome|brands') }}
Display icon in the entry content
[icon name="apple" set="fontawesome|brands"]
Display icon in the php
echo icon('apple', 'fontawesome|brands');
Version
2.1.0
Lincense
MIT
Links
Categories