class ApiController (View source)

Methods

JsonResponse
error($message, int $code = 400)

Returns an error response in the standard concrete5 error response format.

Item
transform($object, TransformerAbstract $transformer)

Transforms an object using the API transformer

Details

protected JsonResponse error($message, int $code = 400)

Returns an error response in the standard concrete5 error response format.

Parameters

$message
int $code

Return Value

JsonResponse

Item transform($object, TransformerAbstract $transformer)

Transforms an object using the API transformer

Parameters

$object
TransformerAbstract $transformer

Return Value

Item