mirror of
https://github.com/silverstripe/silverstripe-frameworktest
synced 2024-10-22 11:06:02 +02:00
commit
89db95b044
@ -59,7 +59,7 @@ class BasicFieldsTestPage extends TestPage {
|
||||
"TimeDisabled" => "23:59",
|
||||
);
|
||||
|
||||
function getCMSFields() {
|
||||
function getCMSFields($params = null) {
|
||||
$fields = parent::getCMSFields();
|
||||
|
||||
$fields->addFieldsToTab('Root.Text', array(
|
||||
|
@ -1,6 +1,6 @@
|
||||
<?php
|
||||
class FileUploadRole extends DataExtension{
|
||||
function extraStatics() {
|
||||
function extraStatics($class = null, $extension = null) {
|
||||
return array(
|
||||
'has_one' => array(
|
||||
'AFile' => 'File',
|
||||
|
@ -1,7 +1,7 @@
|
||||
<?php
|
||||
|
||||
class FrameworkTestRole extends DataExtension {
|
||||
function extraStatics() {
|
||||
function extraStatics($class = null, $extension = null) {
|
||||
return array(
|
||||
'has_one' => array(
|
||||
'FavouritePage' => 'SiteTree',
|
||||
@ -9,7 +9,7 @@ class FrameworkTestRole extends DataExtension {
|
||||
);
|
||||
}
|
||||
|
||||
function updateCMSFields($fields) {
|
||||
function updateCMSFields(FieldList $fields) {
|
||||
$fields->push(new TreeDropdownField("FavouritePageID", "Favourite page", "SiteTree"));
|
||||
}
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
<?php
|
||||
class FrameworkTestSiteTreeExtension extends DataExtension {
|
||||
|
||||
function extraStatics() {
|
||||
function extraStatics($class = null, $extension = null) {
|
||||
return array(
|
||||
'has_one' => array('RelationFieldsTestPage' => 'RelationFieldsTestPage'),
|
||||
'belongs_many_many' => array('RelationFieldsTestPages' => 'RelationFieldsTestPage'),
|
||||
|
@ -28,7 +28,7 @@ class GridFieldTestPage extends Page {
|
||||
$page->doPublish();
|
||||
}
|
||||
|
||||
public function getCMSFields() {
|
||||
public function getCMSFields($class = null, $extension = null) {
|
||||
$fields = parent::getCMSFields();
|
||||
|
||||
$config = new GridFieldConfig_RecordEditor();
|
||||
|
@ -2,7 +2,7 @@
|
||||
|
||||
class LegacyTableFieldsTestPage extends TestPage {
|
||||
|
||||
function getCMSFields() {
|
||||
function getCMSFields($class = null, $extension = null) {
|
||||
$fields = parent::getCMSFields();
|
||||
|
||||
$tf = new TableListField('CompaniesTF', 'Company');
|
||||
|
@ -15,7 +15,7 @@ class RelationFieldsTestPage extends TestPage {
|
||||
"ManyManyPages" => "SiteTree",
|
||||
);
|
||||
|
||||
function getCMSFields() {
|
||||
function getCMSFields($class = null, $extension = null) {
|
||||
$fields = parent::getCMSFields();
|
||||
|
||||
$fields->addFieldToTab("Root.CheckboxSet",
|
||||
|
@ -8,7 +8,7 @@ class TestPage extends Page {
|
||||
/**
|
||||
* We can only create subclasses of TestPage
|
||||
*/
|
||||
function canCreate() {
|
||||
function canCreate($member = null) {
|
||||
return $this->class != 'TestPage' && parent::canCreate();
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user