Project

General

Profile

Actions

Task #60633

closed

Rewrite Module Menu

Added by Benni Mack almost 10 years ago. Updated over 6 years ago.

Status:
Closed
Priority:
Should have
Assignee:
Category:
Backend API
Target version:
Start date:
2014-07-25
Due date:
% Done:

100%

Estimated time:
TYPO3 Version:
6.2
PHP Version:
Tags:
Complexity:
Sprint Focus:

Description

Currently rendering of the module menu of the backend left side is quite complex. This is beacause there are several parts introduced in recent TYPO3 versions, that have only substited parts of the existing code. So the "old" code was still in use. To give a better understanding I will first introduce all the parts relevant to the rendering of the module menu.

PHP side
- The mother of all classes is ModuleLoader.php, originally made by Kasper, which takes TBE_MODULES and compiles a long list of all modules into an array. (ModuleLoader->load()). Currently this class is kept as is for the time being.
- For 4.1/4.2, the ModuleMenuView was introduced, a wrapper class to access the data of ModuleLoader and also does some other stuff like saving the Open/Collapsed state of the modules via AJAX (note: this will be handled browser-internally via LocalStorage in the future, as it saves us HTTP requests). It does one other thing: Rendering of the Logout Button. This is completely in the wrong place, as the Logout button isn't within the module menu frame anymore, but on the top right area of the backend.
- The BackendController class is responsible for adding all HTML and JS code code to the backend.php page so it can be rendered. It instantiates the ModuleMenuView class to call the LogoutButton function.
- As one of the first steps of rewriting the module menu a couple of versions ago, there was a ModuleController, which was again a wrapper for ModuleLoader while putting everything together in a ModuleRepository, along with Module objects and a singleton object ModuleStorage. This new version allows for nesting of up to three levels (incl. modfuncs), along with clear objects instead of arrays.

JS side
- The module menu isn't output with a single line of PHP code, as it is defined as a ExtJS storage which fetches the module menu asynchronous. The HTML code is built in a ExtJS template, which leads to the funny effect that the raw backend.php only zero HTML code output for the module menu.
An extra AJAX request is fired to load up the module, which then is prepared and templated by ExtJS.

The changes:
- The logout button rendering is now done in the BackendController and not in the ModuleMenuView class.
- The menu is now outputted in the BackendController at the same time as backend.php by a standalone Fluid template. The menu is built by a simple call to the ModuleRepository which returns a ModuleStorage.
- ModuleMenuView, ModuleMenuController are not needed anymore, and are deprecated.
- The JS is rewritten so that it works again. These parts are filled up with jQuery code.
- The collapsed/open state of the main modules is now done via the local storage JS functionality of the browsers to avoid further unnecessary HTTP loading operations.

Still todo:
- implement one AJAX call to fetch the module menu data via AJAX to re-implement "reloadMenu". Any reloads of the menu should be done via jQuery AJAX.


Related issues 2 (0 open2 closed)

Related to TYPO3 Core - Bug #61485: Upgrade wizard for backend user setting startModuleClosedWouter Wolters2014-09-09

Actions
Related to TYPO3 Core - Bug #67422: ExtJS cards do not workClosed2015-06-11

Actions
Actions #1

Updated by Benni Mack almost 10 years ago

  • Description updated (diff)
Actions #2

Updated by Gerrit Code Review almost 10 years ago

  • Status changed from New to Under Review

Patch set 1 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at http://review.typo3.org/31876

Actions #3

Updated by Gerrit Code Review over 9 years ago

Patch set 2 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at http://review.typo3.org/31876

Actions #4

Updated by Gerrit Code Review over 9 years ago

Patch set 3 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at http://review.typo3.org/31876

Actions #5

Updated by Gerrit Code Review over 9 years ago

Patch set 4 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at http://review.typo3.org/31876

Actions #6

Updated by Gerrit Code Review over 9 years ago

Patch set 5 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at http://review.typo3.org/31876

Actions #7

Updated by Gerrit Code Review over 9 years ago

Patch set 6 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at http://review.typo3.org/31876

Actions #8

Updated by Gerrit Code Review over 9 years ago

Patch set 7 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at http://review.typo3.org/31876

Actions #9

Updated by Benni Mack over 9 years ago

  • Status changed from Under Review to Resolved
  • % Done changed from 0 to 100
Actions #10

Updated by Riccardo De Contardi over 6 years ago

  • Status changed from Resolved to Closed
Actions

Also available in: Atom PDF