public function getAction(Revision $revision)
    {
        $this->granted('VIEW', $revision->getContent());

        $response = $this->createJsonResponse();
        $response->setData($revision->jsonSerialize(Revision::JSON_REVISION_FORMAT));

        return $response;
    }
public function getAction(Revision $revision)
    {
        $this->granted('VIEW', $revision->getContent());

        $response = $this->createJsonResponse();
        $response->setData($revision->jsonSerialize(Revision::JSON_REVISION_FORMAT));

        return $response;
    }
public function getAction ( Revision $ revision ) { $ this -> granted ( 'VIEW' , $ revision -> getContent ( ) ) ; $ response = $ this -> createJsonResponse ( ) ; $ response -> setData ( $ revision -> jsonSerialize ( Revision :: JSON_REVISION_FORMAT ) ) ; return $ response ; }
Returns a revision.

@return Symfony\Component\HttpFoundation\JsonResponse

@Rest\ParamConverter(name="revision", class="BackBee\ClassContent\Revision")
@Rest\Security("is_fully_authenticated() & has_role('ROLE_API_USER')")
Returns a revision .