From b5c1adc877098f05a1a7ea2b51215c8610215a97 Mon Sep 17 00:00:00 2001 From: Christian Kuhn <lolli@schwarzbu.ch> Date: Mon, 20 Jun 2022 00:07:26 +0200 Subject: [PATCH] [TASK] Improve some property & method comments MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Add some more comments to TemplateService related properties and fix typos. Resolves: #97796 Releases: main Change-Id: I131e141e0d1acce57ded287348c7ed0e2ab8a983 Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/74964 Tested-by: core-ci <typo3@b13.com> Tested-by: Stefan Bürk <stefan@buerk.tech> Tested-by: Simon Schaufelberger <simonschaufi+typo3@gmail.com> Tested-by: Christian Kuhn <lolli@schwarzbu.ch> Reviewed-by: Stefan Bürk <stefan@buerk.tech> Reviewed-by: Simon Schaufelberger <simonschaufi+typo3@gmail.com> Reviewed-by: Christian Kuhn <lolli@schwarzbu.ch> --- .../core/Classes/Domain/Repository/PageRepository.php | 2 +- .../core/Classes/TypoScript/TemplateService.php | 11 +++++++++-- typo3/sysext/core/Classes/Utility/PathUtility.php | 2 +- 3 files changed, 11 insertions(+), 4 deletions(-) diff --git a/typo3/sysext/core/Classes/Domain/Repository/PageRepository.php b/typo3/sysext/core/Classes/Domain/Repository/PageRepository.php index b759f58fc432..96e80029bcce 100644 --- a/typo3/sysext/core/Classes/Domain/Repository/PageRepository.php +++ b/typo3/sysext/core/Classes/Domain/Repository/PageRepository.php @@ -1573,7 +1573,7 @@ class PageRepository implements LoggerAwareInterface * usage might produce undesired results and that should be evaluated on * individual basis. * - * Principle; Record online! => Find offline? + * Principle: Record online! => Find offline? * * @param string $table Table name * @param array $row Record array passed by reference. As minimum, the "uid", "pid" and "t3ver_state" fields must exist! The record MAY be set to FALSE in which case the calling function should act as if the record is forbidden to access! diff --git a/typo3/sysext/core/Classes/TypoScript/TemplateService.php b/typo3/sysext/core/Classes/TypoScript/TemplateService.php index 87a339649ecb..53b7342e281a 100644 --- a/typo3/sysext/core/Classes/TypoScript/TemplateService.php +++ b/typo3/sysext/core/Classes/TypoScript/TemplateService.php @@ -156,14 +156,21 @@ class TemplateService protected $rootId; /** - * The rootline from current page to the root page + * The rootline from current page to the root page. + * This is exactly the same as $absoluteRootLine, just in reversed order, so + * first entry with key 0 is site-root page, last node is requested page with + * the highest key. + * This is set up by runThroughTemplates(). * * @var array */ public $rootLine; /** - * Rootline all the way to the root. Set but runThroughTemplates + * Rootline all the way to the root. Set by runThroughTemplates. + * This is basically the direct output of RootlineUtility: First node + * has the highest key and is the deepest page (typically the uid of the requested page), + * the last node is the root node of the site and has key 0. */ protected array $absoluteRootLine = []; diff --git a/typo3/sysext/core/Classes/Utility/PathUtility.php b/typo3/sysext/core/Classes/Utility/PathUtility.php index 0c276c666ebb..7f86df970d9f 100644 --- a/typo3/sysext/core/Classes/Utility/PathUtility.php +++ b/typo3/sysext/core/Classes/Utility/PathUtility.php @@ -313,7 +313,7 @@ class PathUtility * @see \TYPO3\CMS\Core\Utility\GeneralUtility::getFileAbsFileName() * * Resolves all dots and slashes between that paths of both files. - * Whether the result is absolute or not, depends of the base file name. + * Whether the result is absolute or not, depends on the base file name. * * If the include file goes higher than a relative base file, then the result * will contain dots as a relative part. -- GitLab