Wouter pushed a first patch set at https://review.typo3.org/#/c/34034/ to refactor the PHP side of Toolbar that generates the html structure in BackendController. This was reviewed by lolli leading to some architectural goals and decisions.
The bigger plan:
- ToolbarItemHookInterface will be dropped from 7 and NOT be used anymore. Extensions currently using this interface will NOT be supported and will not get their item rendered anymore.
- "Toolbar" is the whole thing on the top right of the backend
- "Toolbaritem" is one element in the toolbar
- "Toolbar drop down" is an (optional) menu that may unfold
- New interface: Toolbaritem
[DONE] getPriority() or getPosition() (number 0...100): 0 is left, 100 is right, LiveSearch would return 90 to be "most right"
[DONE] hasDropDown() TRUE if the toolbar item has a drop down
[DONE] getToolbaritemContent() return html, wrapped by BackendController in a div
[DONE] getDropDownContent() return html, wrapped by BackendController in a div
Some method to find out if item should be rendered at all? eg. sys_action only shows up if there are queries to show
- [DONE] BackendController will add a unique css id to each item based on the Toolbaritem classname
- It would be preferred if a method like checkAccess() is NOT needed for the items interface, the maybe the "special" tca group item allowing access control could be extended to implement access control for toolbar (similar to module menu)
- The new interface is NOT carved in stone in 7.0 and may change during 7 development
- [DONE DIFFENTLY] Toolbaritem auto registration: If an extension finds a file in Classes/Backend/Toolbaritems, it will find and load it and will throw an exception if the class does not implement the interface.
- ModuleMenu items and Toolbar are somehow similar - it may happen that both are merged in an unique php interface later, this is still unknown however.
- Create .rst documentation
[!!!][TASK] Clean up OpendocsToolbarItem references
With toolbar refactoring, OpendocsController was renamed
to OpendocsToolbarItem and a class alias was introduced to
cope with core internal usages of the old class names. This
is cleaned up with this patch.
The class was still referenced in alt_doc_nodoc.php entry
point through EditDocumentController. This ancient code is
obsolete since around 4.3 but was never removed. The patch
now removes this entry point and redirects to dummy.php in
EditDocumentController just in case this code snippet is
still triggered somehow - which is unlikely, but can not be
Furthermore, the alias OpendocsController is removed: The
new class implements a different interface now, so this
would break anyway - which is also unlikely to be used by
third party code.
Reviewed-by: Wouter Wolters <firstname.lastname@example.org>
Tested-by: Wouter Wolters <email@example.com>
Reviewed-by: Anja Leichsenring <firstname.lastname@example.org>
Tested-by: Anja Leichsenring <email@example.com>
Reviewed-by: Markus Klein <firstname.lastname@example.org>
Tested-by: Markus Klein <email@example.com>
Reviewed-by: Christian Kuhn <firstname.lastname@example.org>
Tested-by: Christian Kuhn <email@example.com>
#2 Updated by Christian Kuhn over 5 years ago
https://review.typo3.org/#/c/34034/ - wouter version
https://review.typo3.org/#/c/33269/ - first felix version
Next steps: The toolbar refactoring currently blocks other patches during #koppsrpint. the wouter codeline will be adapted to not contain the old interface anymore and will then be merged quickly. the above points will be changed is smaller steps next days.