SilverWare\FontIcons\Backends\FontAwesomeBackend
An implementation of the font icon backend interface for Font Awesome.
- Author: Colin Tucker <colin@praxis.net.au>
- Copyright: 2017 Praxis Interactive
- License: https://opensource.org/licenses/BSD-3-Clause BSD-3-Clause
Synopsis
class FontAwesomeBackend
implements
FontIconBackend,Flushable
{
- // members
- protected string $source = 'https://raw.githubusercontent.com/FortAwesome/Font-Awesome/{version}/src/icons.yml';
- protected array $classes = ;
- protected $version;
- // methods
- public static void flush()
- public static CacheInterface cache()
- public $this setSource()
- public string getSource()
- public $this setClasses()
- public array getClasses()
- public $this setVersion()
- public stringh getVersion()
- public string getFieldTagName()
- public string getFieldClasses()
- public DBHTMLText getTag()
- public string getClassName()
- public array getIcons()
- public array getGroupedIcons()
- public string getCacheKey()
- public string getSourceURL()
- public string getSourceVersion()
- public string getSourceData()
Hierarchy
Implements
- SilverWare\FontIcons\Interfaces\FontIconBackend
- SilverStripe\Core\Flushable
Members
protected
- $classes
—
array
An array of identifiers mapped to the equivalent stylesheet class names. - $source
—
string
Defines the source URL used to obtain icon data. - $version
—
string
Defines the version of Font Awesome in use.
Methods
public
- cache() — Answers the cache object.
- flush() — Clears the font icon cache upon flush.
- getCacheKey() — Answers the key used with the cache.
- getClassName() — Answers the class name for the specified identifier.
- getClasses() — Answers the value of the classes attribute.
- getFieldClasses() — Answers the classes to use for icons within the field.
- getFieldTagName() — Answers the tag name to use for icons within the field.
- getGroupedIcons() — Answers an array of icons grouped into their respective categories.
- getIcons() — Answers an associative array of icon IDs mapped to icon names.
- getSource() — Answers the value of the source attribute.
- getSourceData() — Answers the icon data from the source URL.
- getSourceURL() — Answers the source URL including the desired version.
- getSourceVersion() — Answers the source version.
- getTag() — Answers a font icon tag with the given class names and optional color.
- getVersion() — Answers the value of the version attribute.
- setClasses() — Defines the value of the classes attribute.
- setSource() — Defines the value of the source attribute.
- setVersion() — Defines the value of the version attribute.