core/icon_system

Icon System base module.

Source:
License:
  • http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later

Classes

core/icon_system

Methods

(async, static) instance() → {Promise.<IconSystem>}

Source:

Factory method to fetch the Icon System currently in use.

Returns:
Type
Promise.<IconSystem>

(inner) getTemplateName() → {string}

Source:

Get the name of the template.

Returns:
Type
string

(inner) renderIcon(key, component, title, template) → {string}

Source:

Render an icon.

The key, component and title come from either the pix mustache helper tag, or the call to templates.renderIcon. The template is the pre-loaded template string matching the template from getTemplateName() in this class. This function must return a string (not a promise) because it is used during the internal rendering of the mustache template (which is unfortunately synchronous). To render the mustache template in this function call core/mustache.render() directly and do not use any partials, blocks or helper functions in the template.

Parameters:
Name Type Description
key string
component string
title string
template string
Returns:
Type
string