2013-08-08 16:22:22 +02:00
|
|
|
<?php
|
|
|
|
// {{{ICINGA_LICENSE_HEADER}}}
|
|
|
|
// {{{ICINGA_LICENSE_HEADER}}}
|
|
|
|
|
|
|
|
namespace Icinga\Web\Widget\Tabextension;
|
|
|
|
|
2014-04-28 14:03:52 +02:00
|
|
|
use Icinga\Web\Widget\Tabs;
|
|
|
|
use Icinga\Web\Url;
|
2013-08-08 16:22:22 +02:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Tabextension that adds the basket command
|
|
|
|
*
|
|
|
|
* @TODO: Baskets are not supported in the codebase yet (Feature #4537)
|
|
|
|
*/
|
|
|
|
class BasketAction implements Tabextension
|
|
|
|
{
|
|
|
|
/**
|
2013-08-16 15:05:03 +02:00
|
|
|
* Applies the dashboard actions to the provided tabset
|
|
|
|
*
|
|
|
|
* @param Tabs $tabs The tabs object to extend with
|
2013-08-08 16:22:22 +02:00
|
|
|
*/
|
|
|
|
public function apply(Tabs $tabs)
|
|
|
|
{
|
2013-08-14 16:00:19 +02:00
|
|
|
$tabs->addAsDropdown(
|
|
|
|
'basket',
|
|
|
|
array(
|
2013-08-16 15:05:03 +02:00
|
|
|
'title' => 'URL Basket',
|
|
|
|
'url' => Url::fromPath('basket/add'),
|
2013-08-14 16:00:19 +02:00
|
|
|
'urlParams' => array(
|
2013-08-16 15:05:03 +02:00
|
|
|
'url' => Url::fromRequest()->getRelativeUrl()
|
2013-08-14 16:00:19 +02:00
|
|
|
)
|
2013-08-08 16:22:22 +02:00
|
|
|
)
|
2013-08-14 16:00:19 +02:00
|
|
|
);
|
2013-08-08 16:22:22 +02:00
|
|
|
}
|
2013-08-14 16:00:19 +02:00
|
|
|
}
|