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

This commit is contained in:
Craig Lyons 2014-06-19 12:40:51 -04:00
parent 6b67ee0ff8
commit ba411a2eea

View File

@ -78,6 +78,13 @@ class Widget extends DataObject {
'CMSTitle' => 'Title'
);
public function getCMSFields(){
$fields = parent::getCMSFields();
$fields->removeByName(array('Sort', 'ParentID'));
$fields->push(CheckboxField::create('Enabled'));
return $fields;
}
/**
* @var WidgetController
*/