Commit fae113b5 authored by Benni Mack's avatar Benni Mack Committed by Oliver Hader
Browse files

[BUGFIX] Use direct method calls for backend layouts in Page Module

Within all refactorings, fetching the correct backend layout and relevant colPos
information was still called via callUserFunction which is not needed at all,
as it is a static information (class + method name) so a regular method call
via PHP works just fine.

Resolves: #90254
Releases: master
Change-Id: I712e86b3a5d343bad3b4752a21dac9cbdc510f46
Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/63073


Tested-by: default avatarTYPO3com <noreply@typo3.com>
Tested-by: Georg Ringer's avatarGeorg Ringer <georg.ringer@gmail.com>
Tested-by: Oliver Hader's avatarOliver Hader <oliver.hader@typo3.org>
Reviewed-by: Oliver Klee's avatarOliver Klee <typo3-coding@oliverklee.de>
Reviewed-by: Georg Ringer's avatarGeorg Ringer <georg.ringer@gmail.com>
Reviewed-by: Oliver Hader's avatarOliver Hader <oliver.hader@typo3.org>
parent 4ee479d6
......@@ -680,7 +680,8 @@ class PageLayoutController
');
// Find backend layout / columns
$backendLayout = GeneralUtility::callUserFunction(BackendLayoutView::class . '->getSelectedBackendLayout', $this->id, $this);
$backendLayoutContainer = GeneralUtility::makeInstance(BackendLayoutView::class);
$backendLayout = $backendLayoutContainer->getSelectedBackendLayout($this->id);
if (!empty($backendLayout['__colPosList'])) {
$this->colPosList = implode(',', $backendLayout['__colPosList']);
}
......@@ -765,6 +766,8 @@ class PageLayoutController
// Initialize other variables:
$tableOutput = [];
$CMcounter = 0;
$backendLayoutContainer = GeneralUtility::makeInstance(BackendLayoutView::class);
$tcaItems = $backendLayoutContainer->getColPosListItemsParsed($this->id);
// Traverse the list of table names which has records on this page (that array is populated
// by the $dblist object during the function getTableMenu()):
foreach ($dbList->activeTables as $table => $value) {
......@@ -778,7 +781,6 @@ class PageLayoutController
// Setting up the tt_content columns to show:
if (is_array($GLOBALS['TCA']['tt_content']['columns']['colPos']['config']['items'])) {
$colList = [];
$tcaItems = GeneralUtility::callUserFunction(BackendLayoutView::class . '->getColPosListItemsParsed', $this->id, $this);
foreach ($tcaItems as $temp) {
$colList[] = $temp[1];
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment