mirror of
https://github.com/a2nt/silverstripe-font-awesome.git
synced 2024-10-22 17:05:51 +02:00
27 lines
685 B
PHP
27 lines
685 B
PHP
<?php
|
|
|
|
/**
|
|
* Class FASettings
|
|
*/
|
|
class FASettings extends DataExtension
|
|
{
|
|
private static $db = array(
|
|
'UseCDN' => 'boolean(1)'
|
|
);
|
|
|
|
private static $defaults = array(
|
|
'UseCDN' => 'No'
|
|
);
|
|
|
|
public function updateCMSFields(FieldList $fields)
|
|
{
|
|
$fields->addFieldsToTab('Root.FontAwesome', array(
|
|
OptionsetField::create('UseCDN', 'CDN for loading frontend assets?')
|
|
->setDescription('Depending on hosting, your viewers may or may not get better performance using a CDN')
|
|
->setSource(array(
|
|
true => 'Yes',
|
|
false => 'No'
|
|
))
|
|
));
|
|
}
|
|
} |