src/Graviton/RestBundle/Service/RestUtils.php
public function getModelFromRoute(Route $route)
    {
        $ret = false;
        $controller = $this->getControllerFromRoute($route);

        if ($controller instanceof RestController) {
            $ret = $controller->getModel();
        }

        return $ret;
    }
public function getModelFromRoute(Route $route)
    {
        $ret = false;
        $controller = $this->getControllerFromRoute($route);

        if ($controller instanceof RestController) {
            $ret = $controller->getModel();
        }

        return $ret;
    }
public function getModelFromRoute ( Route $ route ) { $ ret = false ; $ controller = $ this -> getControllerFromRoute ( $ route ) ; if ( $ controller instanceof RestController ) { $ ret = $ controller -> getModel ( ) ; } return $ ret ; }
Gets the Model assigned to the RestController

@param Route $route Route

@return bool|object The model or false
@throws \Exception
Gets the Model assigned to the RestController