Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

We're retiring the forums!

The SilverStripe forums have passed their heyday. They'll stick around, but will be read only. We'd encourage you to get involved in the community via the following channels instead:

Themes /

Discuss SilverStripe Themes.

Moderators: martimiz, Sean, Ed, biapar, Willr, Ingo, swaiba

Problem with customsiteconfig with woody theme


Go to End


2 Posts   1377 Views

Avatar
elusive

Community Member, 3 Posts

7 May 2013 at 6:09am

Guys, i need your help!
Error:
Strict Standards: Declaration of CustomSiteConfig::extraStatics() should be compatible with that of DataExtension::extraStatics() in /var/www/elusi489/data/www/mestocrimea.ru/mysite/CustomSiteConfig.php on line 59

File:

<?php

class CustomSiteConfig extends DataExtension {

function extraStatics() {
return array(
'db' => array(

'Tekst1' => 'HTMLText',
'Tekst2' => 'HTMLText',
'Tekst3' => 'HTMLText',
'Tekst4' => 'HTMLText',
'Tekst5' => 'HTMLText',
'Tekst6' => 'HTMLText',
'Facebook' => 'Text',
'Youtube' => 'Text',
'Twitter' => 'Text',
'Google' => 'Text',

),
'has_one' => array(
'Ban1' => 'Image',
'Ban2' => 'Image',
'Ban3' => 'Image',
'Ban4' => 'Image',
'Ban5' => 'Image',
'Ban6' => 'Image',
)
);
}

public function updateCMSFields(FieldList $fields) {

$fields->addFieldToTab('Root.Banners', new ImageField('Ban1', 'Banner 1'));
$fields->addFieldToTab('Root.Banners', new ImageField('Ban2', 'Banner 2'));
$fields->addFieldToTab('Root.Banners', new ImageField('Ban3', 'Banner 3'));
$fields->addFieldToTab('Root.Banners', new ImageField('Ban4', 'Banner 4'));
$fields->addFieldToTab('Root.Banners', new ImageField('Ban5', 'Banner 5'));
$fields->addFieldToTab('Root.Banners', new ImageField('Ban6', 'Banner 6'));

$fields->addFieldToTab('Root.Texts', new TextareaField('Tekst1', 'Text 1'));
$fields->addFieldToTab('Root.Texts', new TextareaField('Tekst2', 'Text 2'));
$fields->addFieldToTab('Root.Texts', new TextareaField('Tekst3', 'Text 3'));
$fields->addFieldToTab('Root.Texts', new TextareaField('Tekst4', 'Text 4'));
$fields->addFieldToTab('Root.Texts', new TextareaField('Tekst5', 'Text 5'));
$fields->addFieldToTab('Root.Texts', new TextareaField('Tekst6', 'Text 6'));

$fields->addFieldToTab('Root.SocialLinks', new TextareaField('Facebook', 'Facebook'));
$fields->addFieldToTab('Root.SocialLinks', new TextareaField('Youtube', 'YouTube'));
$fields->addFieldToTab('Root.SocialLinks', new TextareaField('Twitter', 'Twitter'));
$fields->addFieldToTab('Root.SocialLinks', new TextareaField('Google', 'Google'));

}

}

Avatar
Webdoc

Community Member, 349 Posts

13 May 2013 at 10:42pm

What version on Silverstripe are u using?

Arvixe Web Hosting / SilverStripe Community Liaison | Looking for quality SilverStripe Web Hosting? Look no further than Arvixe Web Hosting!