Version: current

     1 <?php
     2 /**
     3  * Настройки модуля документов
     4  *
     5  * @author inxo
     6  */
     7 class DocumentSiteConfig extends DataObjectDecorator  {
     8     function extraStatics() {
     9         return array(
    10             'db' => array(
    11                 'DocumentsPerPage' => 'Int', // Новостей на странице раздела
    12             ),
    13             'default' => array(
    14                 'DocumentsPerPage' => 20,
    15             )
    16         );
    17     }
    18
    19     public function updateCMSFields(FieldSet &$fields) {
    20         $tab = WebylonSiteConfig::get_config_tab($fields, 'Documents', _t('SiteConfig.DocumentsConfigTitle', 'Documents'));
    21
    22         $tab->push(new HeaderField('Documents', _t('SiteConfig.DocumentsConfigTitle', 'Documents')));
    23         $tab->push(new NumericField('DocumentsPerPage', _t('SiteConfig.DocumentsPerPage', 'Documents Per Page')));
    24     }
    25 }
    26
    27

[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. -