1<?php 2/* Icinga Web 2 | (c) 2014 Icinga Development Team | GPLv2+ */ 3 4namespace Icinga\Web\Widget\Tabextension; 5 6use Icinga\Web\Url; 7use Icinga\Web\Widget\Tabs; 8 9/** 10 * Dashboard settings 11 */ 12class DashboardSettings implements Tabextension 13{ 14 /** 15 * Apply this tabextension to the provided tabs 16 * 17 * @param Tabs $tabs The tabbar to modify 18 */ 19 public function apply(Tabs $tabs) 20 { 21 $tabs->addAsDropdown( 22 'dashboard_add', 23 array( 24 'icon' => 'dashboard', 25 'label' => t('Add Dashlet'), 26 'url' => Url::fromPath('dashboard/new-dashlet') 27 ) 28 ); 29 30 $tabs->addAsDropdown( 31 'dashboard_settings', 32 array( 33 'icon' => 'dashboard', 34 'label' => t('Settings'), 35 'url' => Url::fromPath('dashboard/settings') 36 ) 37 ); 38 } 39} 40