mirror of
https://github.com/silverstripe/silverstripe-frameworktest
synced 2024-10-22 11:06:02 +02:00
Fixed extraStatics usage
This commit is contained in:
parent
b928d641ee
commit
907f4dd73a
@ -1,12 +1,8 @@
|
||||
<?php
|
||||
class FileUploadRole extends DataExtension{
|
||||
function extraStatics($class = null, $extension = null) {
|
||||
return array(
|
||||
'has_one' => array(
|
||||
'AFile' => 'File',
|
||||
'AImage' => 'Image',
|
||||
),
|
||||
);
|
||||
}
|
||||
static $has_one = array(
|
||||
'AFile' => 'File',
|
||||
'AImage' => 'Image',
|
||||
);
|
||||
}
|
||||
?>
|
||||
|
@ -1,13 +1,10 @@
|
||||
<?php
|
||||
|
||||
class FrameworkTestRole extends DataExtension {
|
||||
function extraStatics($class = null, $extension = null) {
|
||||
return array(
|
||||
'has_one' => array(
|
||||
'FavouritePage' => 'SiteTree',
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
static $has_one = array(
|
||||
'FavouritePage' => 'SiteTree',
|
||||
);
|
||||
|
||||
function updateCMSFields(FieldList $fields) {
|
||||
$fields->push(new TreeDropdownField("FavouritePageID", "Favourite page", "SiteTree"));
|
||||
|
@ -1,11 +1,7 @@
|
||||
<?php
|
||||
class FrameworkTestSiteTreeExtension extends DataExtension {
|
||||
|
||||
function extraStatics($class = null, $extension = null) {
|
||||
return array(
|
||||
'has_one' => array('RelationFieldsTestPage' => 'RelationFieldsTestPage'),
|
||||
'belongs_many_many' => array('RelationFieldsTestPages' => 'RelationFieldsTestPage'),
|
||||
);
|
||||
}
|
||||
static $has_one = array('RelationFieldsTestPage' => 'RelationFieldsTestPage');
|
||||
static $belongs_many_many = array('RelationFieldsTestPages' => 'RelationFieldsTestPage');
|
||||
|
||||
}
|
||||
|
@ -4,7 +4,7 @@ class TestModelAdmin extends ModelAdmin {
|
||||
static $url_segment = 'test';
|
||||
static $menu_title = 'Test ModelAdmin';
|
||||
|
||||
public static $managed_models = array(
|
||||
static $managed_models = array(
|
||||
"Company",
|
||||
"Employee",
|
||||
);
|
||||
|
Loading…
Reference in New Issue
Block a user