Controller/Api/Resource/BaseResourceController.php
public function getAction(Request $request, $id)
    {
        $this->checkAccess('GET', $id);
        $resource = $this->getResourceManager()->find($id);
        $view = $this->view($resource, \FOS\RestBundle\Util\Codes::HTTP_OK);
        return $this->handleView($view);
    }
public function getAction(Request $request, $id)
    {
        $this->checkAccess('GET', $id);
        $resource = $this->getResourceManager()->find($id);
        $view = $this->view($resource, \FOS\RestBundle\Util\Codes::HTTP_OK);
        return $this->handleView($view);
    }
public function getAction ( Request $ request , $ id ) { $ this -> checkAccess ( 'GET' , $ id ) ; $ resource = $ this -> getResourceManager ( ) -> find ( $ id ) ; $ view = $ this -> view ( $ resource , \ FOS \ RestBundle \ Util \ Codes :: HTTP_OK ) ; return $ this -> handleView ( $ view ) ; }
Gets a resource for a given id.

@param Request $request the request object
@param mixed $id the resource id

@return View

@throws NotFoundHttpException when resource not exist
Gets a resource for a given id .