diff options
author | Frederic Guillot <fred@kanboard.net> | 2016-04-09 22:42:17 -0400 |
---|---|---|
committer | Frederic Guillot <fred@kanboard.net> | 2016-04-09 22:42:17 -0400 |
commit | 11858be4e8d5aba983700c6cba1c4d0a33ea8e9d (patch) | |
tree | 38427e86d52185df95e2b891e4bcd50aeb56eeb9 /app/Controller/GroupHelper.php | |
parent | 42813d702d1c3e5659301bc771f8dbb37a6d15cd (diff) |
Filter refactoring
Diffstat (limited to 'app/Controller/GroupHelper.php')
-rw-r--r-- | app/Controller/GroupHelper.php | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/app/Controller/GroupHelper.php b/app/Controller/GroupHelper.php index 34f522a6..429614c2 100644 --- a/app/Controller/GroupHelper.php +++ b/app/Controller/GroupHelper.php @@ -2,6 +2,8 @@ namespace Kanboard\Controller; +use Kanboard\Formatter\GroupAutoCompleteFormatter; + /** * Group Helper * @@ -11,14 +13,14 @@ namespace Kanboard\Controller; class GroupHelper extends Base { /** - * Group autocompletion (Ajax) + * Group auto-completion (Ajax) * * @access public */ public function autocomplete() { $search = $this->request->getStringParam('term'); - $groups = $this->groupManager->find($search); - $this->response->json($this->groupAutoCompleteFormatter->setGroups($groups)->format()); + $formatter = new GroupAutoCompleteFormatter($this->groupManager->find($search)); + $this->response->json($formatter->format()); } } |