PHPackages                             silverware/font-icons - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. silverware/font-icons

ActiveSilverstripe-vendormodule[Utility &amp; Helpers](/categories/utility)

silverware/font-icons
=====================

SilverWare Font Icons Module.

1.2.0(7y ago)76.8k5[1 issues](https://github.com/praxisnetau/silverware-font-icons/issues)[1 PRs](https://github.com/praxisnetau/silverware-font-icons/pulls)4BSD-3-ClausePHPPHP &gt;=5.6.0

Since Apr 30Pushed 7y ago1 watchersCompare

[ Source](https://github.com/praxisnetau/silverware-font-icons)[ Packagist](https://packagist.org/packages/silverware/font-icons)[ Docs](https://github.com/praxisnetau/silverware-font-icons)[ RSS](/packages/silverware-font-icons/feed)WikiDiscussions master Synced 3d ago

READMEChangelog (6)Dependencies (4)Versions (15)Used By (4)

SilverWare Font Icons Module
============================

[](#silverware-font-icons-module)

[![Latest Stable Version](https://camo.githubusercontent.com/5fa8112405ab239228988005bab6aa07dbb1be95c8b64686e2de71e766a9c525/68747470733a2f2f706f7365722e707567782e6f72672f73696c766572776172652f666f6e742d69636f6e732f762f737461626c65)](https://packagist.org/packages/silverware/font-icons)[![Latest Unstable Version](https://camo.githubusercontent.com/98c07d2bbfd036b6e6d13b71f07aa6728c68a8ee17b55f47cf3f670b7d31e229/68747470733a2f2f706f7365722e707567782e6f72672f73696c766572776172652f666f6e742d69636f6e732f762f756e737461626c65)](https://packagist.org/packages/silverware/font-icons)[![License](https://camo.githubusercontent.com/80f81f2455b39474d7f748bc14f2eea90b6d7124220f5393665a2f803423d5c0/68747470733a2f2f706f7365722e707567782e6f72672f73696c766572776172652f666f6e742d69636f6e732f6c6963656e7365)](https://packagist.org/packages/silverware/font-icons)

Provides a new form field and database field type for referencing a font icon. Intended to be used with [SilverWare](https://github.com/praxisnetau/silverware), however this module can also be installed into a regular [SilverStripe v4](https://github.com/silverstripe/silverstripe-framework) project. A backend for [Font Awesome](http://fontawesome.io) is provided with the module.

Contents
--------

[](#contents)

- [Background](#background)
- [Requirements](#requirements)
- [Installation](#installation)
- [Configuration](#configuration)
- [Usage](#usage)
- [Issues](#issues)
- [To-Do](#to-do)
- [Contribution](#contribution)
- [Attribution](#attribution)
- [Maintainers](#maintainers)
- [License](#license)

Background
----------

[](#background)

Font icons are neat. They look great on all devices, and are really easy to reference via HTML and CSS. However, font icon libraries such as [Font Awesome](http://fontawesome.io) provide a staggering amount of icons, and we can't really expect users to remember the icon names, codes, or have to refer to a cheatsheet.

We could just provide a standard select field listing all of the icons on offer, but users need to know what the icons look like. Enter `FontIconField` provided by this module. An extension of the SilverWare `Select2AjaxField` class, it provides an Ajax-powered searchable list of icons provided by the configured backend, along with a preview of each icon.

Requirements
------------

[](#requirements)

- [SilverStripe Framework v4](https://github.com/silverstripe/silverstripe-framework)
- [SilverWare Select2 Module](https://github.com/praxisnetau/silverware-select2)

Installation
------------

[](#installation)

Installation is via [Composer](https://getcomposer.org):

```
$ composer require silverware/font-icons

```

Configuration
-------------

[](#configuration)

As with all SilverStripe modules, configuration is via YAML. The SilverStripe dependency injector is used to configure the font icon backend. Font Awesome is configured by default:

```
SilverStripe\Core\Injector\Injector:
  FontIconBackend:
    class: SilverWare\FontIcons\Backends\FontAwesomeBackend
    properties:
      version: 4.7.0
      classes:
        icon: fa-%s
        list-item: fa-li
        fixed-width: fa-fw
```

You can specify the version of Font Awesome in use by changing the `version` property. Upon flush, the backend will download a full list of icons from GitHub and cache the results until the next flush.

Usage
-----

[](#usage)

### Field Type

[](#field-type)

To make use of font icons in your code, you can reference the field type in your `$db` array:

```
use SilverStripe\ORM\DataObject;

class MyObject extends DataObject
{
    private static $db = [
        'Icon' => 'FontIcon'
    ];
}
```

You can also `use` the field type within your class file, and reference the field type directly:

```
use SilverStripe\ORM\DataObject;
use SilverWare\FontIcons\ORM\FieldType\DBFontIcon;

class MyObject extends DataObject
{
    private static $db = [
        'Icon' => DBFontIcon::class
    ];
}
```

### Form Field

[](#form-field)

Within your `getCMSFields` method, create a `FontIconField` to allow the user to select an icon:

```
FontIconField::create('Icon', $this->fieldLabel('Icon'));
```

Don't forget to first `use` the field in the header of your class file:

```
use SilverWare\FontIcons\Forms\FontIconField;
```

### Data Extension

[](#data-extension)

The module also comes with a data extension class to easily add font icons to data objects within SilverStripe. The extension adds a `FontIcon` database field, and a new Icon tab within the CMS containing a `FontIconField`.

To apply the extension to your class, use YAML configuration:

```
MyNamespace\MyObject:
  extensions:
    - SilverWare\FontIcons\Extensions\FontIconExtension
```

Issues
------

[](#issues)

Please use the [GitHub issue tracker](https://github.com/praxisnetau/silverware-font-icons/issues) for bug reports and feature requests.

To-Do
-----

[](#to-do)

- Tests

Contribution
------------

[](#contribution)

Your contributions are gladly welcomed to help make this project better. Please see [contributing](CONTRIBUTING.md) for more information.

Attribution
-----------

[](#attribution)

- Makes use of [Font Awesome](http://fontawesome.io) by [Dave Gandy](https://github.com/davegandy).
- Special thanks to [@hailwood](https://github.com/hailwood) for providing a sane example of how to parse the source icons from Font Awesome with his [SilverStripe v3 module](https://github.com/hailwood/silverstripe-fontawesome).

Maintainers
-----------

[](#maintainers)

[![Colin Tucker](https://avatars3.githubusercontent.com/u/1853705?s=144)](https://github.com/colintucker)[![Praxis Interactive](https://avatars2.githubusercontent.com/u/1782612?s=144)](https://www.praxis.net.au)[Colin Tucker](https://github.com/colintucker)[Praxis Interactive](https://www.praxis.net.au)License
-------

[](#license)

[BSD-3-Clause](LICENSE.md) © Praxis Interactive

###  Health Score

34

—

LowBetter than 77% of packages

Maintenance17

Infrequent updates — may be unmaintained

Popularity27

Limited adoption so far

Community15

Small or concentrated contributor base

Maturity66

Established project with proven stability

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~31 days

Recently: every ~62 days

Total

14

Last Release

2894d ago

Major Versions

0.1.4 → 1.0.02017-06-15

### Community

Maintainers

![](https://www.gravatar.com/avatar/f5d47a59cd183aa3f599c2b66dfce7c79c249c2eacb749f0ac8c38c4ca273d14?d=identicon)[PraxisNetAu](/maintainers/PraxisNetAu)

---

Top Contributors

[![colintucker](https://avatars.githubusercontent.com/u/1853705?v=4)](https://github.com/colintucker "colintucker (29 commits)")

---

Tags

font-awesomefont-iconssilverstripe-4silverwaresilverstripeiconsfontsilverware

### Embed Badge

![Health badge](/badges/silverware-font-icons/health.svg)

```
[![Health](https://phpackages.com/badges/silverware-font-icons/health.svg)](https://phpackages.com/packages/silverware-font-icons)
```

###  Alternatives

[symbiote/silverstripe-advancedworkflow

Adds configurable workflow support to the CMS, with a GUI for creating custom workflow definitions.

46295.2k7](/packages/symbiote-silverstripe-advancedworkflow)[swissup/module-font-awesome

FontAwesome for Magento2

116.9k1](/packages/swissup-module-font-awesome)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
