csoellinger/silverstripe-admin-icons

Little helper classes to get SilverStripe admin icon names easily.

Installs: 69

Dependents: 0

Suggesters: 0

Security: 0

Stars: 1

Watchers: 1

Forks: 0

Open Issues: 0

Type:silverstripe-vendormodule

v1.12.3 2023-03-09 15:08 UTC

README

Little helper classes to get SilverStripe admin icon names easily.

  1. Requirements
  2. Installation
  3. License
  4. Documentation
    1. Csoellinger\Silverstripe\AdminIcons\AdminIcon
    2. Csoellinger\Silverstripe\AdminIcons\AdminIconCss
    3. Csoellinger\Silverstripe\AdminIcons\AdminIconUnicode
  5. Maintainers
  6. Bugtracker
  7. Development and contribution
    1. (Re-)Generate classes
    2. Icon Preview

Requirements

  • PHP 7.* or PHP 8.0
  • SilverStripe ^4
  • SilverStripe Admin ^1

Installation

Just install it with composer. Major and minor versions should be equal to SilverStripe Admin.

composer require csoellinger/silverstripe-admin-icons

License

See License

Documentation

The package generates three classes for all Icons.

Csoellinger\Silverstripe\AdminIcons\AdminIcon

Held the icon names as class constants. Source

<?php

use Csoellinger\Silverstripe\AdminIcons\AdminIcon;

echo AdminIcon::SEARCH; // Output: search

Csoellinger\Silverstripe\AdminIcons\AdminIconCss

Held the icon names prefixed with "font-icon-" as class constants. Source

<?php

use Csoellinger\Silverstripe\AdminIcons\AdminIconCss;

echo AdminIconCss::SEARCH; // Output: font-icon-search

Csoellinger\Silverstripe\AdminIcons\AdminIconUnicode

Held the icon unicode characters as class constants. Source

<?php

use Csoellinger\Silverstripe\AdminIcons\AdminIconUnicode;

echo AdminIconUnicode::SEARCH; // Output: s

Maintainers

Bugtracker

Bugs are tracked in the issues section of this repository. Before submitting an issue please read over existing issues to ensure yours is unique.

If the issue does look like a new bug:

  • Create a new issue
  • Describe the steps required to reproduce your issue, and the expected outcome. Unit tests, screenshots and screencasts can help here.
  • Describe your environment as detailed as possible: SilverStripe version, Browser, PHP version, Operating System, any installed SilverStripe modules.

Please report security issues to the module maintainers directly. Please don't file security issues in the bugtracker.

Development and contribution

If you would like to make contributions to the module please ensure you raise a pull request and discuss with the module maintainers.

(Re-)Generate classes

The package provide a composer script which handles the class generation. It uses the SilverStripe font svg directly from the vendor directoryto get only necessary icons. To (re)generate the classes run the following command:

composer run generate-constant-class

Icon Preview

There is a small script included which allows you to see all included icons. The easiest way to start this is by running a composer script:

composer run serve