mirror of
https://github.com/Icinga/icingaweb2.git
synced 2025-07-28 00:04:04 +02:00
parent
b5711f4031
commit
e63e15e471
50
library/Icinga/Web/Navigation/DashboardPane.php
Normal file
50
library/Icinga/Web/Navigation/DashboardPane.php
Normal file
@ -0,0 +1,50 @@
|
|||||||
|
<?php
|
||||||
|
/* Icinga Web 2 | (c) 2013-2015 Icinga Development Team | GPLv2+ */
|
||||||
|
|
||||||
|
namespace Icinga\Web\Navigation;
|
||||||
|
|
||||||
|
use Icinga\Web\Url;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* A dashboard pane
|
||||||
|
*/
|
||||||
|
class DashboardPane extends NavigationItem
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* This pane's dashlets
|
||||||
|
*
|
||||||
|
* @var array
|
||||||
|
*/
|
||||||
|
protected $dashlets;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Set this pane's dashlets
|
||||||
|
*
|
||||||
|
* @param array $dashlets
|
||||||
|
*
|
||||||
|
* @return $this
|
||||||
|
*/
|
||||||
|
public function setDashlets(array $dashlets)
|
||||||
|
{
|
||||||
|
$this->dashlets = $dashlets;
|
||||||
|
return $this;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Return this pane's dashlets
|
||||||
|
*
|
||||||
|
* @return array
|
||||||
|
*/
|
||||||
|
public function getDashlets()
|
||||||
|
{
|
||||||
|
return $this->dashlets ?: array();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* {@inheritdoc}
|
||||||
|
*/
|
||||||
|
public function init()
|
||||||
|
{
|
||||||
|
$this->setUrl(Url::fromPath('dashboard', array('pane' => $this->getName())));
|
||||||
|
}
|
||||||
|
}
|
Loading…
x
Reference in New Issue
Block a user