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
Requires
- php: 7.4.* || 8.0.*
- silverstripe/admin: ^1.12
- silverstripe/framework: ^4.10
Requires (Dev)
- ergebnis/composer-normalize: ^2.28
README
Little helper classes to get SilverStripe admin icon names easily.
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
- Christopher Söllinger christopher.soellinger@gmail.com
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