Download the PHP package jaedb/iconfield without Composer
On this page you can find all versions of the php package jaedb/iconfield. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Table of contents
Download jaedb/iconfield
More information about jaedb/iconfield
Files in jaedb/iconfield
Download jaedb/iconfield
More information about jaedb/iconfield
Files in jaedb/iconfield
Vendor jaedb
Package iconfield
Short Description Icon field for SilverStripe
License BSD-3-Clause
Homepage http://jamesbarnsley.co.nz
Package iconfield
Short Description Icon field for SilverStripe
License BSD-3-Clause
Homepage http://jamesbarnsley.co.nz
Keywords silverstripe
Please rate this library. Is it a good library?
Informations about the package iconfield
Description
Simplifies the use of icons in a way content authors can set icons without interfering with the asset library. Instead, the web developer provides the icon set which the end-user can use but not manipulate.
Requirements
- SilverStripe 4
Usage
-
Import the required classes:
- Set your
$db
field to typeIcon
(eg'PageIcon' => Icon::class
) IconField::create($name, $title, $iconFolder)
$name
is the database field as defined in your class$title
is the label for this field$iconFolder
(optional) defines the directory where your icons can be found. Defaults to/site/icons
.- To change your default icon directory, see
_config/config.yml
. - Use your icon in templates as you would any other property (eg
$PageIcon
). If your icon is an SVG, the SVG image data will be injected into the template. To prevent this, you can call$PageIcon.IMG
instead to enforce use of<img>
tags.
All versions of iconfield with dependencies
PHP Build Version
Package Version
Requires
silverstripe/cms Version
^4
silverstripe/framework Version ^4
silverstripe/vendor-plugin Version ^1
silverstripe/framework Version ^4
silverstripe/vendor-plugin Version ^1
The package jaedb/iconfield contains the following files
Loading the files please wait ....