Permalink
Browse files

MINOR Removed $params argument to DataObject->getCMSFields(), please …

…use FormScaffolder directly (fixes #7135)
  • Loading branch information...
1 parent b127419 commit dc0168d01b03679ff128fc1449a9cea3a70c9c21 @chillu chillu committed Apr 13, 2012
@@ -129,8 +129,8 @@ function requireDefaultRecords() {
}
}
- function getCMSFields($params = null) {
- $fields = parent::getCMSFields($params);
+ function getCMSFields() {
+ $fields = parent::getCMSFields();
$fields->addFieldToTab(
"Root.Main",
@@ -117,7 +117,7 @@ function onBeforeWrite() {
}
}
- function getCMSFields($params = null) {
+ function getCMSFields() {
Requirements::javascript(CMS_DIR . '/javascript/RedirectorPage.js');
$fields = parent::getCMSFields();
@@ -41,7 +41,7 @@ public static function disable_theme($theme) {
*
* @return FieldList
*/
- function getCMSFields($params = null) {
+ function getCMSFields() {
Requirements::javascript(CMS_DIR . "/javascript/SitetreeAccess.js");
$groupsMap = DataList::create('Group')->map('ID', 'Breadcrumbs')->toArray();
@@ -1745,7 +1745,7 @@ function VirtualPages() {
*
* @return FieldList The fields to be displayed in the CMS.
*/
- function getCMSFields($params = null) {
+ function getCMSFields() {
require_once("forms/Form.php");
// Status / message
// Create a status message for multiple parents
@@ -165,8 +165,8 @@ public function isPublishable() {
/**
* Generate the CMS fields from the fields from the original page.
*/
- function getCMSFields($cms = null) {
- $fields = parent::getCMSFields($cms);
+ function getCMSFields() {
+ $fields = parent::getCMSFields();
// Setup the linking to the original page.
$copyContentFromField = new TreeDropdownField(
@@ -34,7 +34,7 @@ class Widget extends DataObject {
static $cmsTitle = "Name of this widget";
static $description = "Description of what this widget does.";
- function getCMSFields($params = null) {
+ function getCMSFields() {
$fields = new FieldList();
$this->extend('updateCMSFields', $fields);
return $fields;
@@ -114,7 +114,7 @@ function testThatGetCMSFieldsWorksOnEveryPageType() {
$page->flushCache();
$page = DataObject::get_by_id("SiteTree", $page->ID);
- $this->assertTrue($page->getCMSFields(null) instanceof FieldList);
+ $this->assertTrue($page->getCMSFields() instanceof FieldList);
}
}
@@ -460,7 +460,7 @@ class WidgetAreaEditorTest_TestWidget extends Widget implements TestOnly {
static $db = array(
'Title' => 'Varchar'
);
- public function getCMSFields($params = null) {
+ public function getCMSFields() {
$fields = new FieldList();
$fields->push(new TextField('Title'));
return $fields;

0 comments on commit dc0168d

Please sign in to comment.