MINOR Removed $params argument to DataObject->getCMSFields(), please use FormScaffolder directly (fixes #7135)

This commit is contained in:
Ingo Schommer 2012-04-13 15:55:32 +02:00
parent b127419f76
commit dc0168d01b
8 changed files with 10 additions and 10 deletions

View File

@ -129,8 +129,8 @@ class ErrorPage extends Page {
} }
} }
function getCMSFields($params = null) { function getCMSFields() {
$fields = parent::getCMSFields($params); $fields = parent::getCMSFields();
$fields->addFieldToTab( $fields->addFieldToTab(
"Root.Main", "Root.Main",

View File

@ -117,7 +117,7 @@ class RedirectorPage extends Page {
} }
} }
function getCMSFields($params = null) { function getCMSFields() {
Requirements::javascript(CMS_DIR . '/javascript/RedirectorPage.js'); Requirements::javascript(CMS_DIR . '/javascript/RedirectorPage.js');
$fields = parent::getCMSFields(); $fields = parent::getCMSFields();

View File

@ -41,7 +41,7 @@ class SiteConfig extends DataObject implements PermissionProvider {
* *
* @return FieldList * @return FieldList
*/ */
function getCMSFields($params = null) { function getCMSFields() {
Requirements::javascript(CMS_DIR . "/javascript/SitetreeAccess.js"); Requirements::javascript(CMS_DIR . "/javascript/SitetreeAccess.js");
$groupsMap = DataList::create('Group')->map('ID', 'Breadcrumbs')->toArray(); $groupsMap = DataList::create('Group')->map('ID', 'Breadcrumbs')->toArray();

View File

@ -1745,7 +1745,7 @@ class SiteTree extends DataObject implements PermissionProvider,i18nEntityProvid
* *
* @return FieldList The fields to be displayed in the CMS. * @return FieldList The fields to be displayed in the CMS.
*/ */
function getCMSFields($params = null) { function getCMSFields() {
require_once("forms/Form.php"); require_once("forms/Form.php");
// Status / message // Status / message
// Create a status message for multiple parents // Create a status message for multiple parents

View File

@ -165,8 +165,8 @@ class VirtualPage extends Page {
/** /**
* Generate the CMS fields from the fields from the original page. * Generate the CMS fields from the fields from the original page.
*/ */
function getCMSFields($cms = null) { function getCMSFields() {
$fields = parent::getCMSFields($cms); $fields = parent::getCMSFields();
// Setup the linking to the original page. // Setup the linking to the original page.
$copyContentFromField = new TreeDropdownField( $copyContentFromField = new TreeDropdownField(

View File

@ -34,7 +34,7 @@ class Widget extends DataObject {
static $cmsTitle = "Name of this widget"; static $cmsTitle = "Name of this widget";
static $description = "Description of what this widget does."; static $description = "Description of what this widget does.";
function getCMSFields($params = null) { function getCMSFields() {
$fields = new FieldList(); $fields = new FieldList();
$this->extend('updateCMSFields', $fields); $this->extend('updateCMSFields', $fields);
return $fields; return $fields;

View File

@ -114,7 +114,7 @@ class CMSMainTest extends FunctionalTest {
$page->flushCache(); $page->flushCache();
$page = DataObject::get_by_id("SiteTree", $page->ID); $page = DataObject::get_by_id("SiteTree", $page->ID);
$this->assertTrue($page->getCMSFields(null) instanceof FieldList); $this->assertTrue($page->getCMSFields() instanceof FieldList);
} }
} }

View File

@ -460,7 +460,7 @@ class WidgetAreaEditorTest_TestWidget extends Widget implements TestOnly {
static $db = array( static $db = array(
'Title' => 'Varchar' 'Title' => 'Varchar'
); );
public function getCMSFields($params = null) { public function getCMSFields() {
$fields = new FieldList(); $fields = new FieldList();
$fields->push(new TextField('Title')); $fields->push(new TextField('Title'));
return $fields; return $fields;