icingaweb2/library/Icinga/Web/Widget/Tabextension/DashboardSettings.php

40 lines
1006 B
PHP
Raw Normal View History

<?php
2015-02-03 15:49:34 +01:00
/* Icinga Web 2 | (c) 2013-2015 Icinga Development Team | http://www.gnu.org/licenses/gpl-2.0.txt */
namespace Icinga\Web\Widget\Tabextension;
use Icinga\Web\Url;
use Icinga\Web\Widget\Tabs;
/**
* Dashboard settings
*/
class DashboardSettings implements Tabextension
{
/**
* Apply this tabextension to the provided tabs
*
* @param Tabs $tabs The tabbar to modify
*/
public function apply(Tabs $tabs)
{
$tabs->addAsDropdown(
'dashboard_add',
array(
'icon' => 'img/icons/dashboard.png',
'title' => t('Add To Dashboard'),
2014-11-20 13:40:54 +01:00
'url' => Url::fromPath('dashboard/new-dashlet')
)
);
$tabs->addAsDropdown(
'dashboard_settings',
array(
'icon' => 'img/icons/dashboard.png',
'title' => t('Settings'),
'url' => Url::fromPath('dashboard/settings')
)
);
}
2015-02-03 15:49:34 +01:00
}