Icon API
Component ID
252274
Component name
Icon API
Component type
module
Maintenance status
Development status
Component security advisory coverage
covered
Downloads
75026
Component created
Component changed
Component body
This module provides integration for icon bundles and icon providers throughout Drupal.
Integrations
- icon_block - icon support for blocks.
- icon_menu - icon support for menu items.
- icon_field - icon support on field-able entities.
- icon_filter - icon support as a filter for text-area fields.
Providers (via module or theme)
- IcoMoon (provider link)
- Fontello (provider link)
- Bootstrap (provider link)
- Font Awesome (provider link)
- FAMFAMFAM (provider link)
API/Documentation
Icon API comes with extensive documentation on how to integrate your module or service provider. If you need help, look at the previous modules/themes as examples.
Icon Filter Sub-Module
Add an icon inside formatted text-area fields that have the icon filter enabled: [icon:%bundle:%icon].%bundle is the bundle machine name, like: my_bundle%icon is the icon machine name, like: my_icon
Render an icon anywhere!
All you need to know is the bundle's machine name and the icon machine name, Icon API handles the rest!
$element[] = array(
'#theme' => 'icon',
'#bundle' => 'my_bundle',
'#icon' => 'my_icon',
);
print drupal_render($element);
