diff options
Diffstat (limited to 'app/Controller/GroupAjaxController.php')
-rw-r--r-- | app/Controller/GroupAjaxController.php | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/app/Controller/GroupAjaxController.php b/app/Controller/GroupAjaxController.php new file mode 100644 index 00000000..496e9ef2 --- /dev/null +++ b/app/Controller/GroupAjaxController.php @@ -0,0 +1,26 @@ +<?php + +namespace Kanboard\Controller; + +use Kanboard\Formatter\GroupAutoCompleteFormatter; + +/** + * Group Ajax Controller + * + * @package Kanboard\Controller + * @author Frederic Guillot + */ +class GroupAjaxController extends BaseController +{ + /** + * Group auto-completion (Ajax) + * + * @access public + */ + public function autocomplete() + { + $search = $this->request->getStringParam('term'); + $formatter = new GroupAutoCompleteFormatter($this->groupManager->find($search)); + $this->response->json($formatter->format()); + } +} |