mirror of
https://github.com/Icinga/icingaweb2.git
synced 2025-07-26 23:34:08 +02:00
parent
1e39ec668a
commit
54d08f99e8
@ -33,11 +33,21 @@ class DashboardPane extends NavigationItem
|
|||||||
/**
|
/**
|
||||||
* Return this pane's dashlets
|
* Return this pane's dashlets
|
||||||
*
|
*
|
||||||
|
* @param bool $order Whether to order the dashlets first
|
||||||
|
*
|
||||||
* @return array
|
* @return array
|
||||||
*/
|
*/
|
||||||
public function getDashlets()
|
public function getDashlets($order = true)
|
||||||
{
|
{
|
||||||
return $this->dashlets ?: array();
|
if ($this->dashlets === null) {
|
||||||
|
return array();
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($order) {
|
||||||
|
ksort($this->dashlets);
|
||||||
|
}
|
||||||
|
|
||||||
|
return $this->dashlets;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -56,8 +66,8 @@ class DashboardPane extends NavigationItem
|
|||||||
parent::merge($item);
|
parent::merge($item);
|
||||||
|
|
||||||
$this->setDashlets(array_merge(
|
$this->setDashlets(array_merge(
|
||||||
$this->getDashlets(),
|
$this->getDashlets(false),
|
||||||
$item->getDashlets()
|
$item->getDashlets(false)
|
||||||
));
|
));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user