mirror of
https://github.com/Icinga/icingaweb2.git
synced 2025-07-29 16:54:04 +02:00
parent
17ebe07e57
commit
32659647b9
@ -6,6 +6,7 @@ namespace Icinga\Web\Widget;
|
|||||||
use Icinga\Web\Form;
|
use Icinga\Web\Form;
|
||||||
use Icinga\Web\Request;
|
use Icinga\Web\Request;
|
||||||
use Icinga\Data\Sortable;
|
use Icinga\Data\Sortable;
|
||||||
|
use Icinga\Application\Icinga;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* SortBox widget
|
* SortBox widget
|
||||||
@ -106,6 +107,17 @@ class SortBox extends AbstractWidget
|
|||||||
return $this;
|
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
|
* Render this SortBox as HTML
|
||||||
*
|
*
|
||||||
|
Loading…
x
Reference in New Issue
Block a user