From e32eeb991eda1d457b3ccb95d2d0bf77d513d921 Mon Sep 17 00:00:00 2001 From: Alexander Klimov Date: Tue, 7 Apr 2015 11:32:09 +0200 Subject: [PATCH] Implement Icinga\Web\Widget\SortBox::create() --- library/Icinga/Web/Widget/SortBox.php | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/library/Icinga/Web/Widget/SortBox.php b/library/Icinga/Web/Widget/SortBox.php index 26e5257e7e..a53e5aee3f 100644 --- a/library/Icinga/Web/Widget/SortBox.php +++ b/library/Icinga/Web/Widget/SortBox.php @@ -68,6 +68,20 @@ public function __construct($name, array $sortFields) $this->sortFields = $sortFields; } + /** + * Create a SortBox with the entries from $sortFields + * + * @param string $name The name of the sort form + * @param array $sortFields An array containing the columns and their labels to be displayed + * in the sort select box + * + * @return static + */ + public static function create($name, array $sortFields) + { + return new static($name, $sortFields); + } + /** * Apply the parameters from the given request on this SortBox *