Bug #64257
closedPageRepository::getMenu(): Support multiple uid
100%
Description
TYPO3\CMS\Frontend\Page\PageRepository::getMenu() currently only supports an integer as $uid parameter, allowing selecting the subpages of a single parent page only.
When building a menu myself, I want to do this as efficient as possible. This means that I'd like to select the pages on the second level with a single query, instead of querying each child page for their pages.
Having getMenu() support an array of UIDs would solve the problem and make efficient selection of second level child pages possible.
Current unwanted state:
//number of SQL queries increases with the number of menu items $childPages = $pageSelect->getMenu(0); $subChildPages = array(); foreach ($pages as $page) { $subChildPages = array_merge( $subChildPages, $pageSelect->getMenu($page['uid']) ); }
Wanted:
// only 2 SQL queries, no matter how many child pages exist $childPages = $pageSelect->getMenu(0); $childUids = array_keys($childPages); $subChildPages = $pageSelect->getMenu($childUids);
Updated by Mathias Schreiber almost 10 years ago
- Target version set to 7.2 (Frontend)
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/36042
Updated by Gerrit Code Review almost 10 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/36042
Updated by Gerrit Code Review almost 10 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/36042
Updated by Gerrit Code Review almost 10 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/36042
Updated by Gerrit Code Review almost 10 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/36042
Updated by Gerrit Code Review almost 10 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/36042
Updated by Christian Weiske almost 10 years ago
- Status changed from Under Review to Resolved
- % Done changed from 0 to 100
Applied in changeset dd601c5db7f99dfd6baea41aa6d67b5048e44ca9.
Updated by Riccardo De Contardi about 7 years ago
- Status changed from Resolved to Closed