API CHANGE Removed LeftAndMain->RootForm(), concept no longer applies in 3.0 UI. Use EmptyForm() or EditForm()

This commit is contained in:
Ingo Schommer 2012-03-08 18:20:11 +01:00
parent b321b9b995
commit c117ef58cf
3 changed files with 4 additions and 10 deletions

View File

@ -77,7 +77,6 @@ class LeftAndMain extends Controller implements PermissionProvider {
'show',
'EditorToolbar',
'EditForm',
'RootForm',
'AddForm',
'batchactions',
'BatchActionsForm',
@ -928,16 +927,12 @@ class LeftAndMain extends Controller implements PermissionProvider {
$form->setFields($readonlyFields);
}
} else {
$form = $this->RootForm();
$form = $this->EmptyForm();
}
return $form;
}
function RootForm() {
return $this->EmptyForm();
}
/**
* Returns a placeholder form, used by {@link getEditForm()} if no record is selected.
* Our javascript logic always requires a form to be present in the CMS interface.

View File

@ -22,7 +22,6 @@ class SecurityAdmin extends LeftAndMain implements PermissionProvider {
'memberimport',
'GroupImportForm',
'groupimport',
'RootForm'
);
/**
@ -118,8 +117,6 @@ class SecurityAdmin extends LeftAndMain implements PermissionProvider {
$actions = new FieldList();
$this->extend('updateRootFormFields', $fields, $actions);
$form = new Form(
$this,
'EditForm',
@ -130,6 +127,8 @@ class SecurityAdmin extends LeftAndMain implements PermissionProvider {
$form->setTemplate($this->getTemplatesWithSuffix('_EditForm'));
if($form->Fields()->hasTabset()) $form->Fields()->findOrMakeTab('Root')->setTemplate('CMSTabSet');
$form->addExtraClass('center ss-tabset ' . $this->BaseCSSClasses());
$this->extend('updateEditForm', $form);
return $form;
}

View File

@ -55,7 +55,7 @@ class Group extends DataObject {
/**
* Caution: Only call on instances, not through a singleton.
* The "root group" fields will be created through {@link SecurityAdmin->RootForm()}.
* The "root group" fields will be created through {@link SecurityAdmin->EditForm()}.
*
* @return FieldList
*/