Skip to content

Commit

Permalink
Added new parameter to setting menu item priority
Browse files Browse the repository at this point in the history
  • Loading branch information
butschster committed Feb 26, 2016
1 parent b2bb87e commit 78e56c6
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions src/Admin.php
Original file line number Diff line number Diff line change
Expand Up @@ -111,16 +111,19 @@ public function template()
}

/**
* @param string $class
* @param string|null $section
* @param string $class
* @param string|null $section
* @param int $priority
*
* @return NavigationPage
*/
public function addMenuLink($class, $section = null)
public function addMenuLink($class, $section = null, $priority = 100)
{
$model = $this->getModel($class);
$page = new NavigationPage($model);

$page->priority = $priority;

if (is_null($section)) {
$section = AdminNavigation::getRootSection();
} else {
Expand Down

0 comments on commit 78e56c6

Please sign in to comment.