canVisitElement($resource)) { throw new AuthorizationFailedException(); } $meta = []; return $this->getContentResponse($resource, ResponsesInterface::HTTP_OK, [], $meta); } }