From ae708a712a5dd932c01e734f8450b899b1407a70 Mon Sep 17 00:00:00 2001 From: Frederic Guillot Date: Tue, 20 Dec 2016 20:06:39 -0500 Subject: Offer the possibility to override internal formatter objects from plugins --- app/Controller/GroupAjaxController.php | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'app/Controller/GroupAjaxController.php') 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()); } } -- cgit v1.2.3