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

(inner) getTemplateName() → {String}

Source:

getTemplateName

Returns:
Type
String

(inner) init() → {Promise}

Source:

Initialise the icon system.

Returns:
Type
Promise

(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