Re-add getCMSFields, inherit scaffolding, remove Sort & ParentID fields by default

This commit is contained in:
Craig Lyons 2014-06-19 11:27:01 -04:00
parent 6b67ee0ff8
commit 209c13637a

View File

@ -92,6 +92,12 @@ class Widget extends DataObject {
return $this->renderWith("WidgetHolder"); return $this->renderWith("WidgetHolder");
} }
public function getCMSFields(){
$fields = parent::getCMSFields();
$fields->removeByName(array('Sort', 'ParentID'));
return $fields;
}
/** /**
* Default way to render widget in templates. * Default way to render widget in templates.
* @return string HTML * @return string HTML