mirror of
https://github.com/silverstripe/silverstripe-cms
synced 2024-10-22 08:05:56 +02:00
MINOR Don't use deprecated extraStatics when adding extra statics with
DataExtension
This commit is contained in:
parent
ec3ebc91d8
commit
542d727db2
@ -5,13 +5,9 @@
|
||||
*/
|
||||
class SiteTreeFileExtension extends DataExtension {
|
||||
|
||||
function extraStatics($class = null, $extension = null) {
|
||||
return array(
|
||||
'belongs_many_many' => array(
|
||||
"BackLinkTracking" => "SiteTree",
|
||||
)
|
||||
);
|
||||
}
|
||||
public static $belongs_many_many = array(
|
||||
'BackLinkTracking' => 'SiteTree'
|
||||
);
|
||||
|
||||
/**
|
||||
* Extend through {@link updateBackLinkTracking()} in your own {@link Extension}.
|
||||
|
@ -243,13 +243,10 @@ class SiteTreeBacklinksTest extends SapphireTest {
|
||||
}
|
||||
|
||||
class SiteTreeBacklinksTest_DOD extends DataExtension implements TestOnly {
|
||||
function extraStatics($class = null, $extension = null) {
|
||||
return array(
|
||||
'db' => array(
|
||||
'ExtraContent' => 'HTMLText',
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
static $db = array(
|
||||
'ExtraContent' => 'HTMLText',
|
||||
);
|
||||
|
||||
function updateCMSFields(FieldList $fields) {
|
||||
$fields->addFieldToTab("Root.Content", new HTMLEditorField("ExtraContent"));
|
||||
|
@ -607,14 +607,12 @@ class VirtualPageTest_VirtualPageSub extends VirtualPage implements TestOnly {
|
||||
}
|
||||
|
||||
class VirtualPageTest_PageExtension extends DataExtension implements TestOnly {
|
||||
function extraStatics($class = null, $extension = null) {
|
||||
return array(
|
||||
'db' => array(
|
||||
// These fields are just on an extension to simulate shared properties between Page and VirtualPage.
|
||||
// Not possible through direct $db definitions due to VirtualPage inheriting from Page, and Page being defined elsewhere.
|
||||
'MySharedVirtualField' => 'Text',
|
||||
'MySharedNonVirtualField' => 'Text',
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
static $db = array(
|
||||
// These fields are just on an extension to simulate shared properties between Page and VirtualPage.
|
||||
// Not possible through direct $db definitions due to VirtualPage inheriting from Page, and Page being defined elsewhere.
|
||||
'MySharedVirtualField' => 'Text',
|
||||
'MySharedNonVirtualField' => 'Text',
|
||||
);
|
||||
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user