From 16fd4d4ab781dc8747bf3f6493d165b4b59ab69a Mon Sep 17 00:00:00 2001 From: Ryan Cramer Date: Tue, 30 Mar 2021 08:05:14 -0400 Subject: [PATCH] Updates to PageProperties class. This was meant to be included in the previous commit resolving processwire/processwire-issues#1359 --- wire/core/PageProperties.php | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/wire/core/PageProperties.php b/wire/core/PageProperties.php index 0292c0bb..b8aef473 100644 --- a/wire/core/PageProperties.php +++ b/wire/core/PageProperties.php @@ -16,6 +16,9 @@ abstract class PageProperties { + const typePage = 1; + const typePageArray = 2; + /** * Page class helper object instances (one of each helper per ProcessWire instance, lazy loaded) * @@ -190,6 +193,24 @@ abstract class PageProperties { 'descendant' => 'findOne', ); + /** + * Method/property return types + * + * @var array + * @since 3.0.175 + * + */ + public static $traversalReturnTypes = array( + 'parent' => self::typePage, + 'rootParent' => self::typePage, + 'child' => self::typePage, + 'next' => self::typePage, + 'prev' => self::typePage, + 'children' => self::typePageArray, + 'parents' => self::typePageArray, + 'siblings' => self::typePageArray, + ); + /** * Name and status language properties (populated by LanguagesSupport module when applicable) *