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
|
<?php
|
||||||
class FileUploadRole extends DataExtension{
|
class FileUploadRole extends DataExtension{
|
||||||
function extraStatics($class = null, $extension = null) {
|
static $has_one = array(
|
||||||
return array(
|
|
||||||
'has_one' => array(
|
|
||||||
'AFile' => 'File',
|
'AFile' => 'File',
|
||||||
'AImage' => 'Image',
|
'AImage' => 'Image',
|
||||||
),
|
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
|
||||||
?>
|
?>
|
||||||
|
@ -1,13 +1,10 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
class FrameworkTestRole extends DataExtension {
|
class FrameworkTestRole extends DataExtension {
|
||||||
function extraStatics($class = null, $extension = null) {
|
|
||||||
return array(
|
static $has_one = array(
|
||||||
'has_one' => array(
|
|
||||||
'FavouritePage' => 'SiteTree',
|
'FavouritePage' => 'SiteTree',
|
||||||
),
|
|
||||||
);
|
);
|
||||||
}
|
|
||||||
|
|
||||||
function updateCMSFields(FieldList $fields) {
|
function updateCMSFields(FieldList $fields) {
|
||||||
$fields->push(new TreeDropdownField("FavouritePageID", "Favourite page", "SiteTree"));
|
$fields->push(new TreeDropdownField("FavouritePageID", "Favourite page", "SiteTree"));
|
||||||
|
@ -1,11 +1,7 @@
|
|||||||
<?php
|
<?php
|
||||||
class FrameworkTestSiteTreeExtension extends DataExtension {
|
class FrameworkTestSiteTreeExtension extends DataExtension {
|
||||||
|
|
||||||
function extraStatics($class = null, $extension = null) {
|
static $has_one = array('RelationFieldsTestPage' => 'RelationFieldsTestPage');
|
||||||
return array(
|
static $belongs_many_many = array('RelationFieldsTestPages' => 'RelationFieldsTestPage');
|
||||||
'has_one' => array('RelationFieldsTestPage' => 'RelationFieldsTestPage'),
|
|
||||||
'belongs_many_many' => array('RelationFieldsTestPages' => 'RelationFieldsTestPage'),
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -4,7 +4,7 @@ class TestModelAdmin extends ModelAdmin {
|
|||||||
static $url_segment = 'test';
|
static $url_segment = 'test';
|
||||||
static $menu_title = 'Test ModelAdmin';
|
static $menu_title = 'Test ModelAdmin';
|
||||||
|
|
||||||
public static $managed_models = array(
|
static $managed_models = array(
|
||||||
"Company",
|
"Company",
|
||||||
"Employee",
|
"Employee",
|
||||||
);
|
);
|
||||||
|
Loading…
Reference in New Issue
Block a user