1 <?php
2
3 class MonumentsSiteConfig extends SiteConfigDecorator {
4
5 function () {
6 return array(
7 'db' => array(
8 'FIOPriceType' => "Enum('fixed,for_letter')",
9 'FIOLetterGravPrice' => 'CatalogPrice',
10 'FIOTotalGravPrice' => 'CatalogPrice',
11
12 'EpitaphPriceType' => "Enum('fixed,for_letter')",
13 'EpitaphLetterGravPrice' => 'CatalogPrice',
14 'EpitaphTotalGravPrice' => 'CatalogPrice',
15
16 'MaxFIOCount' => 'Int',
17 'MaxImageCount' => 'Int',
18 'MaxTileImageCount' => 'Int',
19 )
20 );
21 }
22
23 public function updateCMSFields(FieldSet &$fields) {
24 $tab = self::get_config_tab($fields, 'MonumentsCatalog');
25 $tab->push(new DropdownField('FIOPriceType', $this->owner->fieldLabel('FIOPriceType'), array('fixed' => _t('SiteConfig.FIOPriceType_fixed'), 'for_letter' => _t('SiteConfig.FIOPriceType_for_letter'))));
26 $tab->push(new TextField('FIOLetterGravPrice', $this->owner->fieldLabel('FIOLetterGravPrice')));
27 $tab->push(new TextField('FIOTotalGravPrice', $this->owner->fieldLabel('FIOTotalGravPrice')));
28
29 $tab->push(new DropdownField('EpitaphPriceType', $this->owner->fieldLabel('EpitaphPriceType'), array('fixed' => _t('SiteConfig.EpitaphPriceType_fixed'), 'for_letter' => _t('SiteConfig.EpitaphPriceType_for_letter'))));
30 $tab->push(new TextField('EpitaphLetterGravPrice', $this->owner->fieldLabel('EpitaphLetterGravPrice')));
31 $tab->push(new TextField('EpitaphTotalGravPrice', $this->owner->fieldLabel('EpitaphTotalGravPrice')));
32
33 $tab->push(new NumericField('MaxFIOCount', $this->owner->fieldLabel('MaxFIOCount')));
34 $tab->push(new NumericField('MaxImageCount', $this->owner->fieldLabel('MaxImageCount')));
35 $tab->push(new NumericField('MaxTileImageCount', $this->owner->fieldLabel('MaxTileImageCount')));
36 }
37 }
38
[Raise a SilverStripe Framework issue/bug](https://github.com/silverstripe/silverstripe-framework/issues/new)
- [Raise a SilverStripe CMS issue/bug](https://github.com/silverstripe/silverstripe-cms/issues/new)
- Please use the
Silverstripe Forums to ask development related questions.
-