Add class DashboardPane

refs #5600
This commit is contained in:
Johannes Meyer 2015-09-07 09:06:40 +02:00
parent b5711f4031
commit e63e15e471
1 changed files with 50 additions and 0 deletions

View 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())));
}
}