Skip to content
This repository
Browse code

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

…use FormScaffolder directly (fixes #7135)
  • Loading branch information...
commit dc0168d01b03679ff128fc1449a9cea3a70c9c21 1 parent b127419
Ingo Schommer authored April 13, 2012
4  code/model/ErrorPage.php
@@ -129,8 +129,8 @@ function requireDefaultRecords() {
129 129
 		}
130 130
 	}
131 131
 
132  
-	function getCMSFields($params = null) {
133  
-		$fields = parent::getCMSFields($params);
  132
+	function getCMSFields() {
  133
+		$fields = parent::getCMSFields();
134 134
 		
135 135
 		$fields->addFieldToTab(
136 136
 			"Root.Main", 
2  code/model/RedirectorPage.php
@@ -117,7 +117,7 @@ function onBeforeWrite() {
117 117
 		}
118 118
 	}
119 119
 
120  
-	function getCMSFields($params = null) {
  120
+	function getCMSFields() {
121 121
 		Requirements::javascript(CMS_DIR . '/javascript/RedirectorPage.js');
122 122
 		
123 123
 		$fields = parent::getCMSFields();
2  code/model/SiteConfig.php
@@ -41,7 +41,7 @@ public static function disable_theme($theme) {
41 41
 	 *
42 42
 	 * @return FieldList
43 43
 	 */
44  
-	function getCMSFields($params = null) {
  44
+	function getCMSFields() {
45 45
 		Requirements::javascript(CMS_DIR . "/javascript/SitetreeAccess.js");
46 46
 
47 47
 		$groupsMap = DataList::create('Group')->map('ID', 'Breadcrumbs')->toArray();
2  code/model/SiteTree.php
@@ -1745,7 +1745,7 @@ function VirtualPages() {
1745 1745
 	 *
1746 1746
 	 * @return FieldList The fields to be displayed in the CMS.
1747 1747
 	 */
1748  
-	function getCMSFields($params = null) {
  1748
+	function getCMSFields() {
1749 1749
 		require_once("forms/Form.php");
1750 1750
 		// Status / message
1751 1751
 		// Create a status message for multiple parents
4  code/model/VirtualPage.php
@@ -165,8 +165,8 @@ public function isPublishable() {
165 165
 	/**
166 166
 	 * Generate the CMS fields from the fields from the original page.
167 167
 	 */
168  
-	function getCMSFields($cms = null) {
169  
-		$fields = parent::getCMSFields($cms);
  168
+	function getCMSFields() {
  169
+		$fields = parent::getCMSFields();
170 170
 		
171 171
 		// Setup the linking to the original page.
172 172
 		$copyContentFromField = new TreeDropdownField(
2  code/widgets/Widget.php
@@ -34,7 +34,7 @@ class Widget extends DataObject {
34 34
 	static $cmsTitle = "Name of this widget";
35 35
 	static $description = "Description of what this widget does.";
36 36
 	
37  
-	function getCMSFields($params = null) {
  37
+	function getCMSFields() {
38 38
 		$fields = new FieldList();
39 39
 		$this->extend('updateCMSFields', $fields);
40 40
 		return $fields;
2  tests/controller/CMSMainTest.php
@@ -114,7 +114,7 @@ function testThatGetCMSFieldsWorksOnEveryPageType() {
114 114
 			$page->flushCache();
115 115
 			$page = DataObject::get_by_id("SiteTree", $page->ID);
116 116
 			
117  
-			$this->assertTrue($page->getCMSFields(null) instanceof FieldList);
  117
+			$this->assertTrue($page->getCMSFields() instanceof FieldList);
118 118
 		}
119 119
 	}
120 120
 	
2  tests/widgets/WidgetAreaEditorTest.php
@@ -460,7 +460,7 @@ class WidgetAreaEditorTest_TestWidget extends Widget implements TestOnly {
460 460
 	static $db = array(
461 461
 		'Title' => 'Varchar'
462 462
 	);
463  
-	public function getCMSFields($params = null) {
  463
+	public function getCMSFields() {
464 464
 		$fields = new FieldList();
465 465
 		$fields->push(new TextField('Title'));
466 466
 		return $fields;

0 notes on commit dc0168d

Please sign in to comment.
Something went wrong with that request. Please try again.