parent
c3603c991d
commit
d4dc282ac8
|
@ -43,12 +43,16 @@ class DashboardContainer extends NavigationItemContainer
|
|||
*
|
||||
* @param string $name
|
||||
* @param string $url
|
||||
* @param int $priority
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
public function add($name, $url)
|
||||
public function add($name, $url, $priority = null)
|
||||
{
|
||||
$this->dashlets[$name] = $url;
|
||||
$this->dashlets[$name] = [
|
||||
'url' => $url,
|
||||
'priority' => $priority
|
||||
];
|
||||
return $this;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -315,10 +315,11 @@ class Module
|
|||
foreach ($panes as $pane) {
|
||||
/** @var DashboardContainer $pane */
|
||||
$dashlets = [];
|
||||
foreach ($pane->getDashlets() as $dashletName => $dashletUrl) {
|
||||
foreach ($pane->getDashlets() as $dashletName => $dashletConfig) {
|
||||
$dashlets[$dashletName] = [
|
||||
'label' => $this->translate($dashletName),
|
||||
'url' => $dashletUrl
|
||||
'label' => $this->translate($dashletName),
|
||||
'url' => $dashletConfig['url'],
|
||||
'priority' => $dashletConfig['priority']
|
||||
];
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue