Bug #62928
Updated by Christian Kuhn almost 10 years ago
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. * Naming: ** "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 getPriority() or getPosition() (number 0...100): 0 is left, 100 is right, LiveSearch would return 90 to be "most right" hasDropDown() TRUE if the toolbar item has a drop down getToolbaritemContent() return html, wrapped by BackendController in a div getDropDownContent() return html, wrapped by BackendController in a div $backendReference / $parent should NOT be given as instance to each item (loose coupling) - there is either a getJavaScriptFiles() and getCssFiles() in the interface, or PageRenderer is given to the item classes, or item classes can get PageRenderer on their own * 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 * Toolbaritem auto registration: If an extension finds a file in Classes/Backend/Toolbaritems, Classes/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.