public function getAction($type, $uid, Request $request)
    {
        $this->granted('VIEW', $content = $this->getClassContentByTypeAndUid($type, $uid, true));

        $response = null;
        if (in_array('text/html', $request->getAcceptableContentTypes())) {
            if (false != $pageUid = $request->query->get('page_uid')) {
                if (null !== $page = $this->getEntityManager()->find('BackBee\NestedNode\Page', $pageUid)) {
                    $this->getApplication()->getRenderer()->setCurrentPage($page);
                }
            }

            $mode = $request->query->get('mode', null);
            $response = $this->createResponse(
                $this->getApplication()->getRenderer()->render($content, $mode), 200, 'text/html'
            );
        } else {
            $response = $this->createJsonResponse();
            $response->setData($this->getClassContentManager()->jsonEncode($content, $this->getFormatParam()));
        }

        return $response;
    }