Browse Source
Update phpDoc comments and add more type hinting
Signed-off-by: Julius Härtl <jus@bitgrid.net>
pull/8095/head
Julius Härtl
9 years ago
No known key found for this signature in database
GPG Key ID: 4C614C6ED2CDE6DF
2 changed files with
8 additions and
7 deletions
-
lib/private/NavigationManager.php
-
lib/public/INavigationManager.php
|
|
|
@ -104,9 +104,10 @@ class NavigationManager implements INavigationManager { |
|
|
|
} |
|
|
|
|
|
|
|
/** |
|
|
|
* returns all the added Menu entries |
|
|
|
* @param string $type |
|
|
|
* @return array an array of the added entries |
|
|
|
* Get a list of navigation entries |
|
|
|
* |
|
|
|
* @param string $type type of the navigation entries |
|
|
|
* @return array |
|
|
|
*/ |
|
|
|
public function getAll(string $type = 'link'): array { |
|
|
|
$this->init(); |
|
|
|
@ -128,10 +129,10 @@ class NavigationManager implements INavigationManager { |
|
|
|
/** |
|
|
|
* Sort navigation entries by order, name and set active flag |
|
|
|
* |
|
|
|
* @param $list |
|
|
|
* @return mixed |
|
|
|
* @param array $list |
|
|
|
* @return array |
|
|
|
*/ |
|
|
|
private function proceedNavigation($list) { |
|
|
|
private function proceedNavigation(array $list): array { |
|
|
|
usort($list, function($a, $b) { |
|
|
|
if (isset($a['order']) && isset($b['order'])) { |
|
|
|
return ($a['order'] < $b['order']) ? -1 : 1; |
|
|
|
|
|
|
|
@ -61,7 +61,7 @@ interface INavigationManager { |
|
|
|
/** |
|
|
|
* Get a list of navigation entries |
|
|
|
* |
|
|
|
* @param bool $absolute set to true if links to navigation entries should be converted to absolute urls |
|
|
|
* @param string $type type of the navigation entries |
|
|
|
* @return array |
|
|
|
* @since 14.0.0 |
|
|
|
*/ |
|
|
|
|