mirror of
https://github.com/a2nt/silverstripe-font-awesome.git
synced 2024-10-22 17:05:51 +02:00
21 lines
611 B
PHP
21 lines
611 B
PHP
|
<?php
|
||
|
|
||
|
/**
|
||
|
* Class FontAwesomeField
|
||
|
*/
|
||
|
class FontAwesomeField extends DropdownField
|
||
|
{
|
||
|
public function Type()
|
||
|
{
|
||
|
return 'dropdown';
|
||
|
}
|
||
|
|
||
|
public function __construct($name, $title = null, $source = array(), $value = '', $form = null, $emptyString = null)
|
||
|
{
|
||
|
parent::__construct($name, $title, $source, $value, $form, $emptyString);
|
||
|
$this->setSource(FontAwesome::getIcons());
|
||
|
$this->setTitle("Font Awesome icon");
|
||
|
$this->setDescription('<a href="http://fortawesome.github.io/Font-Awesome/icons/" target="_blank">List of icons available here</a>');
|
||
|
}
|
||
|
}
|