Bolt\Controller\Async\General::tags PHP Method

tags() public method

Fetch a JSON encoded set of taxonomy specific tags.
public tags ( string $taxonomytype ) : Symfony\Component\HttpFoundation\JsonResponse
$taxonomytype string
return Symfony\Component\HttpFoundation\JsonResponse
    public function tags($taxonomytype)
    {
        $table = $this->getOption('general/database/prefix');
        $table .= 'taxonomy';
        $query = $this->createQueryBuilder()->select("DISTINCT {$table}.name")->from($table)->where('taxonomytype = :taxonomytype')->orderBy('name', 'ASC')->setParameters([':taxonomytype' => $taxonomytype]);
        $results = $query->execute()->fetchAll();
        return $this->json($results);
    }