mirror of
https://github.com/getgrav/grav.git
synced 2026-06-18 18:11:23 +02:00
Add a shortcut for pages.find() alias
This commit is contained in:
@@ -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.
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user