Move sorting of $pages from Pico::getPages() to Pico::sortPages()
This commit is contained in:
parent
4f1e8667c3
commit
9d518fd722
1 changed files with 9 additions and 0 deletions
|
@ -298,6 +298,7 @@ class Pico
|
|||
$this->triggerEvent('onPagesLoading');
|
||||
|
||||
$this->readPages();
|
||||
$this->sortPages();
|
||||
$this->discoverCurrentPage();
|
||||
|
||||
$this->triggerEvent('onPagesLoaded', array(
|
||||
|
@ -798,7 +799,15 @@ class Pico
|
|||
|
||||
$this->pages[$id] = $page;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Sorts all pages known to Pico
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
protected function sortPages()
|
||||
{
|
||||
// sort pages
|
||||
$order = $this->getConfig('pages_order');
|
||||
$alphaSortClosure = function ($a, $b) use ($order) {
|
||||
|
|
Loading…
Reference in a new issue