src/StringTagField.php
public function suggest(HTTPRequest $request)
    {
        $responseBody = json_encode(
            ['items' => $this->getTags($request->getVar('term'))]
        );

        $response = HTTPResponse::create();
        $response->addHeader('Content-Type', 'application/json');
        $response->setBody($responseBody);

        return $response;
    }
public function suggest(HTTPRequest $request)
    {
        $responseBody = json_encode(
            ['items' => $this->getTags($request->getVar('term'))]
        );

        $response = HTTPResponse::create();
        $response->addHeader('Content-Type', 'application/json');
        $response->setBody($responseBody);

        return $response;
    }
public function suggest ( HTTPRequest $ request ) { $ responseBody = json_encode ( [ 'items' => $ this -> getTags ( $ request -> getVar ( 'term' ) ) ] ) ; $ response = HTTPResponse :: create ( ) ; $ response -> addHeader ( 'Content-Type' , 'application/json' ) ; $ response -> setBody ( $ responseBody ) ; return $ response ; }
Returns a JSON string of tags, for lazy loading.

@param  HTTPRequest $request
@return HTTPResponse
Returns a JSON string of tags for lazy loading .