diff --git a/library/Icinga/Web/Widget/SortBox.php b/library/Icinga/Web/Widget/SortBox.php index 80c413658..1026596ca 100644 --- a/library/Icinga/Web/Widget/SortBox.php +++ b/library/Icinga/Web/Widget/SortBox.php @@ -5,6 +5,7 @@ namespace Icinga\Web\Widget; use Icinga\Web\Form; use Icinga\Web\Request; +use Icinga\Data\Sortable; /** * SortBox widget @@ -49,6 +50,13 @@ class SortBox extends AbstractWidget */ protected $request; + /** + * What to apply sort parameters on + * + * @var Sortable + */ + protected $query = null; + /** * Create a SortBox with the entries from $sortFields * @@ -87,6 +95,17 @@ class SortBox extends AbstractWidget return $this; } + /** + * @param Sortable $query + * + * @return $this + */ + public function setQuery(Sortable $query) + { + $this->query = $query; + return $this; + } + /** * Render this SortBox as HTML *