mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-02 22:28:37 +02:00
Changelog update for grouped CMS buttons
This commit is contained in:
parent
a355e1d03d
commit
b65180a7f6
@ -4,6 +4,48 @@
|
|||||||
|
|
||||||
## Upgrading
|
## Upgrading
|
||||||
|
|
||||||
|
### Grouped CMS Buttons
|
||||||
|
|
||||||
|
The CMS buttons are now grouped, in order to hide minor actions by default and declutter the interface.
|
||||||
|
This required changing the form field structure from a simple `FieldList`
|
||||||
|
to a `FieldList` which contains a `CompositeField` for all "major actions",
|
||||||
|
and a `TabSet` with a single tab for all "minor actions".
|
||||||
|
If you have previously added, removed or altered built-in CMS actions in any way,
|
||||||
|
you'll need to adjust your code.
|
||||||
|
|
||||||
|
:::php
|
||||||
|
class MyPage extends Page {
|
||||||
|
function getCMSActions() {
|
||||||
|
$actions = parent::getCMSActions();
|
||||||
|
|
||||||
|
// Inserting a new toplevel action (old)
|
||||||
|
$actions->push(new FormAction('MyAction'));
|
||||||
|
|
||||||
|
// Inserting a new toplevel action (new)
|
||||||
|
$actions->insertAfter(new FormAction('MyAction'), 'MajorActions');
|
||||||
|
|
||||||
|
// Removing an action, both toplevel and nested (no change required)
|
||||||
|
$actions->removeByName('action_unpublish');
|
||||||
|
|
||||||
|
// Inserting a new minor action (new)
|
||||||
|
$actions->addFieldToTab(
|
||||||
|
'Root.ActionMenus.MoreOptions',
|
||||||
|
new FormAction('MyMinorAction')
|
||||||
|
);
|
||||||
|
|
||||||
|
// Finding a toplevel action (no change required)
|
||||||
|
$match = $actions->dataFieldByName('action_save');
|
||||||
|
|
||||||
|
// Finding a nested action (new)
|
||||||
|
$match = $actions->fieldByName('ActionMenus.MoreOptions')
|
||||||
|
->fieldByName('action_MyMinorAction');
|
||||||
|
|
||||||
|
return $actions;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
### Other
|
||||||
|
|
||||||
* `TableListField`, `ComplexTableField`, `TableField`, `HasOneComplexTableField`, `HasManyComplexTableField` and `ManyManyComplexTableField` have been removed from the core and placed into a module called "legacytablefields" located at https://github.com/silverstripe-labs/legacytablefields
|
* `TableListField`, `ComplexTableField`, `TableField`, `HasOneComplexTableField`, `HasManyComplexTableField` and `ManyManyComplexTableField` have been removed from the core and placed into a module called "legacytablefields" located at https://github.com/silverstripe-labs/legacytablefields
|
||||||
* `prototype.js` and `behaviour.js` have been removed from the core, they are no longer used. If you have custom code relying on these two libraries, please update your code to include the files yourself
|
* `prototype.js` and `behaviour.js` have been removed from the core, they are no longer used. If you have custom code relying on these two libraries, please update your code to include the files yourself
|
||||||
* `Object::has_extension()` and `Object::add_extension()` deprecated in favour of using late static binding, please use `{class}::has_extension()` and `{class}::add_extension()` instead, where {class} is the class name of your DataObject class.
|
* `Object::has_extension()` and `Object::add_extension()` deprecated in favour of using late static binding, please use `{class}::has_extension()` and `{class}::add_extension()` instead, where {class} is the class name of your DataObject class.
|
||||||
@ -45,4 +87,4 @@
|
|||||||
- `DataList#find`
|
- `DataList#find`
|
||||||
- `DataList#byIDs`
|
- `DataList#byIDs`
|
||||||
- `DataList#reverse`
|
- `DataList#reverse`
|
||||||
* `DataList#dataQuery` has been changed to return a clone of the query, and so can't be used to modify the list's query directly. Use `DataList#alterDataQuery` instead to modify dataQuery in a safe manner.
|
* `DataList#dataQuery` has been changed to return a clone of the query, and so can't be used to modify the list's query directly. Use `DataList#alterDataQuery` instead to modify dataQuery in a safe manner.
|
Loading…
Reference in New Issue
Block a user