From fbb51cffac103377b3d5ee8d74b32797f7d7f690 Mon Sep 17 00:00:00 2001 From: Andy Miller Date: Thu, 31 Mar 2016 16:14:52 -0600 Subject: [PATCH] Add a shortcut for pages.find() alias --- system/src/Grav/Common/Page/Pages.php | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/system/src/Grav/Common/Page/Pages.php b/system/src/Grav/Common/Page/Pages.php index fb98932db..a24a57a64 100644 --- a/system/src/Grav/Common/Page/Pages.php +++ b/system/src/Grav/Common/Page/Pages.php @@ -287,6 +287,19 @@ class Pages return new Collection($children, [], $this); } + /** + * alias method to return find a page. + * + * @param string $url The relative URL of the page + * @param bool $all + * + * @return Page|null + */ + public function find($url, $all = false) + { + return $this->dispatch($url, $all); + } + /** * Dispatch URI to a page. *