mirror of
https://github.com/silverstripe/silverstripe-frameworktest
synced 2024-10-22 09:06:02 +00:00
4.x compat
This commit is contained in:
parent
d1ba84e843
commit
112bdeea92
@ -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(
|
||||
|
@ -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;
|
||||
|
@ -12,7 +12,7 @@
|
||||
],
|
||||
"require":
|
||||
{
|
||||
"silverstripe/framework": "~3.1",
|
||||
"silverstripe/cms": "~3.1"
|
||||
"silverstripe/framework": "~4.0",
|
||||
"silverstripe/cms": "~4.0"
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user