From 8a12abf795a9cdebb206fd2bf9f37ebbcd1dcc5d Mon Sep 17 00:00:00 2001 From: Matias Griese Date: Fri, 8 May 2020 12:53:56 +0300 Subject: [PATCH] Flex: Added `PageCollection::all()` to mimick Pages class --- .../Grav/Common/Flex/Types/Pages/PageCollection.php | 11 +++++++++++ system/src/Grav/Common/Flex/Types/Pages/PageIndex.php | 11 +++++++++++ 2 files changed, 22 insertions(+) diff --git a/system/src/Grav/Common/Flex/Types/Pages/PageCollection.php b/system/src/Grav/Common/Flex/Types/Pages/PageCollection.php index 774a7109b..e6f265b75 100644 --- a/system/src/Grav/Common/Flex/Types/Pages/PageCollection.php +++ b/system/src/Grav/Common/Flex/Types/Pages/PageCollection.php @@ -393,6 +393,17 @@ class PageCollection extends FlexPageCollection implements PageCollectionInterfa return array_keys($list); } + /** + * Mimicks Pages class. + * + * @return $this + * @deprecated 1.7 Not needed anymore in Flex Pages. + */ + public function all() + { + return $this; + } + /** * Returns the items between a set of date ranges of either the page date field (default) or * an arbitrary datetime page field where end date is optional diff --git a/system/src/Grav/Common/Flex/Types/Pages/PageIndex.php b/system/src/Grav/Common/Flex/Types/Pages/PageIndex.php index 29abbe550..84270fd15 100644 --- a/system/src/Grav/Common/Flex/Types/Pages/PageIndex.php +++ b/system/src/Grav/Common/Flex/Types/Pages/PageIndex.php @@ -759,6 +759,17 @@ class PageIndex extends FlexPageIndex implements PageCollectionInterface return $collection; } + /** + * Mimicks Pages class. + * + * @return $this + * @deprecated 1.7 Not needed anymore in Flex Pages. + */ + public function all() + { + return $this; + } + /** * Creates new collection with only visible pages *