RestBundle\Controller\RestController::indexApiAction PHP Method

indexApiAction() public method

List all resources available.
public indexApiAction ( ) : FOS\RestBundle\View\View
return FOS\RestBundle\View\View
    public function indexApiAction()
    {
        $apiResources = [array('Posts' => $this->generateUrl('api_v1_get_posts')), array('Comments' => $this->generateUrl('api_v1_get_comments'))];
        $view = $this->view($apiResources)->setTemplate('RestBundle::api_index.html.twig');
        return $this->handleView($view);
    }