summaryrefslogtreecommitdiff
path: root/app/Controller/GroupHelper.php
blob: 34f522a64ff0d484a0e9bc90f59afe794142fd90 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
<?php

namespace Kanboard\Controller;

/**
 * Group Helper
 *
 * @package  controller
 * @author   Frederic Guillot
 */
class GroupHelper extends Base
{
    /**
     * Group autocompletion (Ajax)
     *
     * @access public
     */
    public function autocomplete()
    {
        $search = $this->request->getStringParam('term');
        $groups = $this->groupManager->find($search);
        $this->response->json($this->groupAutoCompleteFormatter->setGroups($groups)->format());
    }
}