4.x compat

This commit is contained in:
Ingo Schommer 2016-04-19 09:27:29 +12:00
parent d1ba84e843
commit 112bdeea92
3 changed files with 15 additions and 20 deletions

View File

@ -40,7 +40,6 @@ class BasicFieldsTestPage extends TestPage
private static $has_one = array(
'Dropdown' => 'TestCategory',
'GroupedDropdown' => 'TestCategory',
'ListboxField' => 'TestCategory',
'File' => 'File',
'AttachedFile' => 'File',
'Image' => 'Image',
@ -100,7 +99,6 @@ class BasicFieldsTestPage extends TestPage
'CheckboxSetID' => $firstCat->ID,
'DropdownID' => $firstCat->ID,
'GroupedDropdownID' => $firstCat->ID,
'ListboxFieldID' => $firstCat->ID,
'MultipleListboxFieldID' => join(',', array($thirdCat->ID, $firstCat->ID)),
'OptionSet' => join(',', array($thirdCat->ID, $firstCat->ID)),
'Date' => "2002-10-23",
@ -147,10 +145,7 @@ class BasicFieldsTestPage extends TestPage
Object::create('GroupedDropdownField', 'GroupedDropdownID',
'GroupedDropdown', array('Test Categorys' => TestCategory::map())
),
Object::create('ListboxField', 'ListboxFieldID', 'ListboxField', TestCategory::map())
->setSize(3),
Object::create('ListboxField', 'MultipleListboxFieldID', 'ListboxField (multiple)', TestCategory::map())
->setMultiple(true)
->setSize(3),
Object::create('OptionsetField', 'OptionSet', 'OptionSetField', TestCategory::map()),
Object::create('ToggleCompositeField', 'ToggleCompositeField', 'ToggleCompositeField', new FieldList(

View File

@ -9,7 +9,7 @@ class TestPage extends Page
/**
* We can only create subclasses of TestPage
*/
public function canCreate($member = null)
public function canCreate($member = null, $context = array())
{
// Don't allow creation other than through requireDefaultRecords
return false;

View File

@ -12,7 +12,7 @@
],
"require":
{
"silverstripe/framework": "~3.1",
"silverstripe/cms": "~3.1"
"silverstripe/framework": "~4.0",
"silverstripe/cms": "~4.0"
}
}