mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
MINOR Renamed SiteTree->getEditFormFields() to getCMSFields() (including new decorator hook for 'updateCMSFields'). Renamed SiteTree->getEditFormActions() to getCMSActions() (including new decorator hook for 'updateCMSActions'). Old API was never released
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@100967 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
parent
d0e7b1f0e2
commit
dd649257fe
@ -37,11 +37,11 @@ class SiteConfig extends DataObject {
|
||||
|
||||
/**
|
||||
* Get the fields that are sent to the CMS. In
|
||||
* your decorators: updateEditFormFields(&$fields)
|
||||
* your decorators: updateCMSFields(&$fields)
|
||||
*
|
||||
* @return Fieldset
|
||||
*/
|
||||
function getFormFields() {
|
||||
function getCMSFields() {
|
||||
Requirements::javascript(CMS_DIR . "/javascript/SitetreeAccess.js");
|
||||
|
||||
$fields = new FieldSet(
|
||||
@ -96,7 +96,8 @@ class SiteConfig extends DataObject {
|
||||
$fields->makeFieldReadonly($titleField);
|
||||
}
|
||||
|
||||
$this->extend('updateEditFormFields', $fields);
|
||||
$this->extend('updateCMSFields', $fields);
|
||||
|
||||
return $fields;
|
||||
}
|
||||
|
||||
@ -119,7 +120,7 @@ class SiteConfig extends DataObject {
|
||||
*
|
||||
* @return Fieldset
|
||||
*/
|
||||
function getFormActions() {
|
||||
function getCMSActions() {
|
||||
if (Permission::check('ADMIN') || Permission::check('EDIT_SITECONFIG')) {
|
||||
$actions = new FieldSet(
|
||||
new FormAction('save_siteconfig', 'Save')
|
||||
@ -128,7 +129,8 @@ class SiteConfig extends DataObject {
|
||||
$actions = new FieldSet();
|
||||
}
|
||||
|
||||
$this->extend('updateEditFormActions', $actions);
|
||||
$this->extend('updateCMSActions', $actions);
|
||||
|
||||
return $actions;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user