eZ\Publish\Core\REST\Server\Controller\Content::createView PHP Method

createView() public method

Creates and executes a content view.
Deprecation: Since platform 1.0. Forwards the request to the new /views location, but returns a 301.
public createView ( ) : RestExecutedView
return eZ\Publish\Core\REST\Server\Values\RestExecutedView
    public function createView()
    {
        $response = $this->forward('ezpublish_rest.controller.views:createView');
        // Add 301 status code and location href
        $response->setStatusCode(301);
        $response->headers->set('Location', $this->router->generate('ezpublish_rest_views_create'));
        return $response;
    }