private function siteConfigFields(News $owner, SiteConfig $siteConfig)
    {
        /** First the defaults */
        if ($siteConfig->UseAbstract) {
            $this->field_list['Root.Main'][4] = TextareaField::create('Synopsis', $owner->fieldLabel('Synopsis'));
        }
        if ($siteConfig->AllowExternals) {
            $this->type_array['external'] = _t('News.EXTERNALTYPE', 'External link');
            $this->field_list['Root.Main'][5] = TextField::create('External', $owner->fieldLabel('External'));
        }
        if ($siteConfig->AllowDownloads) {
            $this->type_array['download'] = _t('News.DOWNLOADTYPE', 'Downloadable file');
            $this->field_list['Root.Main'][7] = UploadField::create('Download', $owner->fieldLabel('Download'));
        }
        /** Setup the tab for comments, if allowed */
        if ($siteConfig->Comments) {
            $this->field_list['Root'][] = Tab::create(
                'Comments', $owner->fieldLabel('Comments'), GridField::create(
                'Comment', _t('News.COMMENTS', 'Comments'), $owner->Comments(), GridFieldConfig_RelationEditor::create()
            )
            );
        }
    }
private function siteConfigFields(News $owner, SiteConfig $siteConfig)
    {
        /** First the defaults */
        if ($siteConfig->UseAbstract) {
            $this->field_list['Root.Main'][4] = TextareaField::create('Synopsis', $owner->fieldLabel('Synopsis'));
        }
        if ($siteConfig->AllowExternals) {
            $this->type_array['external'] = _t('News.EXTERNALTYPE', 'External link');
            $this->field_list['Root.Main'][5] = TextField::create('External', $owner->fieldLabel('External'));
        }
        if ($siteConfig->AllowDownloads) {
            $this->type_array['download'] = _t('News.DOWNLOADTYPE', 'Downloadable file');
            $this->field_list['Root.Main'][7] = UploadField::create('Download', $owner->fieldLabel('Download'));
        }
        /** Setup the tab for comments, if allowed */
        if ($siteConfig->Comments) {
            $this->field_list['Root'][] = Tab::create(
                'Comments', $owner->fieldLabel('Comments'), GridField::create(
                'Comment', _t('News.COMMENTS', 'Comments'), $owner->Comments(), GridFieldConfig_RelationEditor::create()
            )
            );
        }
    }
private function siteConfigFields ( News $ owner , SiteConfig $ siteConfig ) { /** First the defaults */ if ( $ siteConfig -> UseAbstract ) { $ this -> field_list [ 'Root.Main' ] [ 4 ] = TextareaField :: create ( 'Synopsis' , $ owner -> fieldLabel ( 'Synopsis' ) ) ; } if ( $ siteConfig -> AllowExternals ) { $ this -> type_array [ 'external' ] = _t ( 'News.EXTERNALTYPE' , 'External link' ) ; $ this -> field_list [ 'Root.Main' ] [ 5 ] = TextField :: create ( 'External' , $ owner -> fieldLabel ( 'External' ) ) ; } if ( $ siteConfig -> AllowDownloads ) { $ this -> type_array [ 'download' ] = _t ( 'News.DOWNLOADTYPE' , 'Downloadable file' ) ; $ this -> field_list [ 'Root.Main' ] [ 7 ] = UploadField :: create ( 'Download' , $ owner -> fieldLabel ( 'Download' ) ) ; } /** Setup the tab for comments, if allowed */ if ( $ siteConfig -> Comments ) { $ this -> field_list [ 'Root' ] [ ] = Tab :: create ( 'Comments' , $ owner -> fieldLabel ( 'Comments' ) , GridField :: create ( 'Comment' , _t ( 'News.COMMENTS' , 'Comments' ) , $ owner -> Comments ( ) , GridFieldConfig_RelationEditor :: create ( ) ) ) ; } }
Create the fields based on the SiteConfig settings.

@param News $owner
@param SiteConfig $siteConfig
Create the fields based on the SiteConfig settings .