1 <?php
2
3 4 5 6 7
8 class VideoSiteConfig extends DataObjectDecorator {
9
10 function () {
11 return array(
12 'db' => array(
13 'VideoPerPage' => 'Int',
14 'VideoWidth' => 'Int',
15 'VideoHeight' => 'Int',
16 ),
17 'defaults' => array(
18 'VideoPerPage' => 20,
19 'VideoWidth' => 425,
20 'VideoHeight' => 300,
21 )
22 );
23 }
24
25 public function updateCMSFields(FieldSet &$fields) {
26 $tab = WebylonSiteConfig::get_config_tab($fields, 'Video', _t('SiteConfig.VideoConfigTitle', 'Video'));
27
28 $tab->push(new HeaderField('Video', _t('SiteConfig.VideoConfigTitle', 'Video')));
29 $tab->push(new NumericField('VideoPerPage', _t('SiteConfig.VideoPerPage', 'Video Per Page')));
30 $tab->push(new NumericField('VideoWidth', _t('SiteConfig.VideoWidth', 'Video Width')));
31 $tab->push(new NumericField('VideoHeight', _t('SiteConfig.VideoHeight', 'Video Height')));
32 }
33
34 }
35
[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.
-