parent
17ebe07e57
commit
32659647b9
|
@ -6,6 +6,7 @@ namespace Icinga\Web\Widget;
|
|||
use Icinga\Web\Form;
|
||||
use Icinga\Web\Request;
|
||||
use Icinga\Data\Sortable;
|
||||
use Icinga\Application\Icinga;
|
||||
|
||||
/**
|
||||
* SortBox widget
|
||||
|
@ -106,6 +107,17 @@ class SortBox extends AbstractWidget
|
|||
return $this;
|
||||
}
|
||||
|
||||
public function handleRequest(Request $request = null)
|
||||
{
|
||||
if ($request === null) {
|
||||
$request = Icinga::app()->getFrontController()->getRequest();
|
||||
}
|
||||
if ($sort = $request->getParam('sort')) {
|
||||
$this->query->order($sort, $request->getParam('dir'));
|
||||
}
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Render this SortBox as HTML
|
||||
*
|
||||
|
|
Loading…
Reference in New Issue