Fixed extraStatics usage

This commit is contained in:
Ingo Schommer 2013-03-19 09:44:39 +01:00
parent b928d641ee
commit 907f4dd73a
4 changed files with 11 additions and 22 deletions

View File

@ -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',
);
}
?>

View File

@ -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"));

View File

@ -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');
}

View File

@ -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",
);