From 2e0f5a8555563d1b3b651f2ad09618ea9ecc4d35 Mon Sep 17 00:00:00 2001 From: Elmar Hinz <t3elmar@gmail.com> Date: Thu, 18 May 2017 12:48:05 +0200 Subject: [PATCH] [CLEANUP] Update comment of PageRepository::getMountPointInfo() Update the comment of the mehtod PageRepository::getMountPointInfo(). Add hint addressing to the usage of recursive mount points. Change-Id: I095563cb940e25f8c5f004497d407733faf4cbcc Releases: master, 8.7 Resolves: #81254 Reviewed-on: https://review.typo3.org/52842 Reviewed-by: Christian Kuhn <lolli@schwarzbu.ch> Tested-by: Christian Kuhn <lolli@schwarzbu.ch> Tested-by: TYPO3com <no-reply@typo3.com> --- .../frontend/Classes/Page/PageRepository.php | 33 +++++++++++++++---- 1 file changed, 26 insertions(+), 7 deletions(-) diff --git a/typo3/sysext/frontend/Classes/Page/PageRepository.php b/typo3/sysext/frontend/Classes/Page/PageRepository.php index a7a065dde790..b90edd15f3bd 100644 --- a/typo3/sysext/frontend/Classes/Page/PageRepository.php +++ b/typo3/sysext/frontend/Classes/Page/PageRepository.php @@ -963,16 +963,35 @@ class PageRepository } /** - * Returns MountPoint id for page + * Returns a MountPoint array for the specified page * - * Does a recursive search if the mounted page should be a mount page itself. It - * has a run-away break so it can't go into infinite loops. + * Does a recursive search if the mounted page should be a mount page + * itself. * - * @param int $pageId Page id for which to look for a mount pid. Will be returned only if mount pages are enabled, the correct doktype (7) is set for page and there IS a mount_pid (which has a valid record that is not deleted...) - * @param array|bool $pageRec Optional page record for the page id. If not supplied it will be looked up by the system. Must contain at least uid,pid,doktype,mount_pid,mount_pid_ol - * @param array $prevMountPids Array accumulating formerly tested page ids for mount points. Used for recursivity brake. + * Note: + * + * Recursive mount points are not supported by all parts of the core. + * The usage is discouraged. They may be removed from this method. + * + * @see: https://decisions.typo3.org/t/supporting-or-prohibiting-recursive-mount-points/165/3 + * + * An array will be returned if mount pages are enabled, the correct + * doktype (7) is set for page and there IS a mount_pid with a valid + * record. + * + * The optional page record must contain at least uid, pid, doktype, + * mount_pid,mount_pid_ol. If it is not supplied it will be looked up by + * the system at additional costs for the lookup. + * + * Returns FALSE if no mount point was found, "-1" if there should have been + * one, but no connection to it, otherwise an array with information + * about mount pid and modes. + * + * @param int $pageId Page id to do the lookup for. + * @param array|bool $pageRec Optional page record for the given page. + * @param array $prevMountPids Internal register to prevent lookup cycles. * @param int $firstPageUid The first page id. - * @return mixed Returns FALSE if no mount point was found, "-1" if there should have been one, but no connection to it, otherwise an array with information about mount pid and modes. + * @return mixed Mount point array or failure flags (-1, false). * @see \TYPO3\CMS\Frontend\ContentObject\Menu\AbstractMenuContentObject */ public function getMountPointInfo($pageId, $pageRec = false, $prevMountPids = [], $firstPageUid = 0) -- GitLab