mirror of
https://github.com/silverstripe/silverstripe-reports
synced 2024-10-22 11:05:53 +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 {
|
class SiteTreeFileExtension extends DataExtension {
|
||||||
|
|
||||||
function extraStatics($class = null, $extension = null) {
|
public static $belongs_many_many = array(
|
||||||
return array(
|
'BackLinkTracking' => 'SiteTree'
|
||||||
'belongs_many_many' => array(
|
);
|
||||||
"BackLinkTracking" => "SiteTree",
|
|
||||||
)
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Extend through {@link updateBackLinkTracking()} in your own {@link Extension}.
|
* Extend through {@link updateBackLinkTracking()} in your own {@link Extension}.
|
||||||
|
@ -243,13 +243,10 @@ class SiteTreeBacklinksTest extends SapphireTest {
|
|||||||
}
|
}
|
||||||
|
|
||||||
class SiteTreeBacklinksTest_DOD extends DataExtension implements TestOnly {
|
class SiteTreeBacklinksTest_DOD extends DataExtension implements TestOnly {
|
||||||
function extraStatics($class = null, $extension = null) {
|
|
||||||
return array(
|
static $db = array(
|
||||||
'db' => array(
|
'ExtraContent' => 'HTMLText',
|
||||||
'ExtraContent' => 'HTMLText',
|
);
|
||||||
),
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
function updateCMSFields(FieldList $fields) {
|
function updateCMSFields(FieldList $fields) {
|
||||||
$fields->addFieldToTab("Root.Content", new HTMLEditorField("ExtraContent"));
|
$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 {
|
class VirtualPageTest_PageExtension extends DataExtension implements TestOnly {
|
||||||
function extraStatics($class = null, $extension = null) {
|
|
||||||
return array(
|
static $db = array(
|
||||||
'db' => array(
|
// These fields are just on an extension to simulate shared properties between Page and VirtualPage.
|
||||||
// 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.
|
||||||
// Not possible through direct $db definitions due to VirtualPage inheriting from Page, and Page being defined elsewhere.
|
'MySharedVirtualField' => 'Text',
|
||||||
'MySharedVirtualField' => 'Text',
|
'MySharedNonVirtualField' => 'Text',
|
||||||
'MySharedNonVirtualField' => 'Text',
|
);
|
||||||
)
|
|
||||||
);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user