public function siteAttachAutocompleteAction(Request $request, Site $site, $string)
    {
        if (!$this->isGranted(Access::PERM_GROUP_MANAGE_ALL)) {
            throw $this->createAccessDeniedException();
        }

        $database = $this->getDatabaseConnection();
        $q = $database
            ->select('ucms_group', 'g')
            ->fields('g', ['id', 'title'])
            ->condition(
                (new \DatabaseCondition('OR'))
                    ->condition('g.title', '%' . $database->escapeLike($string) . '%', 'LIKE')
            )
            ->orderBy('g.title', 'asc')
            ->groupBy('g.id')
            ->range(0, 16)
            ->addTag('ucms_group_access')
        ;

        $suggest = [];

        foreach ($q->execute()->fetchAll() as $record) {
            $key = $record->title . ' [' . $record->id . ']';
            $suggest[$key] = check_plain($record->title);
        }

        return new JsonResponse($suggest);
    }