diff options
author | Frederic Guillot <fred@kanboard.net> | 2016-05-16 20:19:07 -0400 |
---|---|---|
committer | Frederic Guillot <fred@kanboard.net> | 2016-05-16 20:19:07 -0400 |
commit | abdf6f97800e7e838b5841820815385b183bab67 (patch) | |
tree | 75576da4a975561d0b93c7bcc7be94a385a4cd75 /app/Controller/GroupAjaxController.php | |
parent | de8ce875f4295e0b3bef20fcca051401f96816ef (diff) |
Improve group controllers and views
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()); + } +} |