diff options
author | Frederic Guillot <fred@kanboard.net> | 2016-12-20 20:06:39 -0500 |
---|---|---|
committer | Frederic Guillot <fred@kanboard.net> | 2016-12-20 20:06:39 -0500 |
commit | ae708a712a5dd932c01e734f8450b899b1407a70 (patch) | |
tree | 348c01ad849fbeeee0fba74118b4536af4119333 /app/Controller/GroupAjaxController.php | |
parent | a957195952e2c93177628ab07936d783da1388c3 (diff) |
Offer the possibility to override internal formatter objects from plugins
Diffstat (limited to 'app/Controller/GroupAjaxController.php')
-rw-r--r-- | app/Controller/GroupAjaxController.php | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/app/Controller/GroupAjaxController.php b/app/Controller/GroupAjaxController.php index 496e9ef2..308bba9e 100644 --- a/app/Controller/GroupAjaxController.php +++ b/app/Controller/GroupAjaxController.php @@ -2,8 +2,6 @@ namespace Kanboard\Controller; -use Kanboard\Formatter\GroupAutoCompleteFormatter; - /** * Group Ajax Controller * @@ -20,7 +18,7 @@ class GroupAjaxController extends BaseController public function autocomplete() { $search = $this->request->getStringParam('term'); - $formatter = new GroupAutoCompleteFormatter($this->groupManager->find($search)); - $this->response->json($formatter->format()); + $groups = $this->groupManager->find($search); + $this->response->json($this->groupAutoCompleteFormatter->withGroups($groups)->format()); } } |