Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Changelog update for grouped CMS buttons

  • Loading branch information...
commit b65180a7f622adeea61dcd0098e1063fb82c5386 1 parent a355e1d
@chillu chillu authored
Showing with 43 additions and 1 deletion.
  1. +43 −1 docs/en/changelogs/3.1.0.md
View
44 docs/en/changelogs/3.1.0.md
@@ -4,6 +4,48 @@
## 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
* `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.
@@ -45,4 +87,4 @@
- `DataList#find`
- `DataList#byIDs`
- `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.
Please sign in to comment.
Something went wrong with that request. Please try again.