2015-05-09 04:58:24 +02:00
|
|
|
<?php
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Class FASettings
|
|
|
|
*/
|
|
|
|
class FASettings extends DataExtension
|
|
|
|
{
|
|
|
|
private static $db = array(
|
2015-05-10 02:11:01 +02:00
|
|
|
'UseCDN' => 'boolean(1)',
|
|
|
|
'UseThemeCSS' => 'boolean(1)',
|
2015-05-09 04:58:24 +02:00
|
|
|
);
|
|
|
|
|
2015-05-18 21:57:03 +02:00
|
|
|
private static $defaults = array(
|
|
|
|
'UseCDN' => false,
|
|
|
|
'UseThemeCSS' => false,
|
|
|
|
);
|
|
|
|
|
2015-05-09 04:58:24 +02:00
|
|
|
public function updateCMSFields(FieldList $fields)
|
|
|
|
{
|
|
|
|
$fields->addFieldsToTab('Root.FontAwesome', array(
|
2015-05-10 02:11:01 +02:00
|
|
|
|
|
|
|
OptionsetField::create('UseThemeCSS', 'Theme dir font-awesome.css?')
|
|
|
|
->setDescription('You may want to use font-awesome.css from your theme directory')
|
|
|
|
->setSource(array(
|
|
|
|
true => 'Yes',
|
|
|
|
false => 'No'
|
|
|
|
)),
|
|
|
|
|
2015-05-10 02:00:14 +02:00
|
|
|
OptionsetField::create('UseCDN', 'CDN for loading frontend assets?')
|
2015-05-09 04:58:24 +02:00
|
|
|
->setDescription('Depending on hosting, your viewers may or may not get better performance using a CDN')
|
|
|
|
->setSource(array(
|
|
|
|
true => 'Yes',
|
|
|
|
false => 'No'
|
|
|
|
))
|
|
|
|
));
|
|
|
|
}
|
|
|
|
}
|