Neos\Neos\Routing\FrontendNodeRoutePartHandler::buildContextFromPath PHP Method

buildContextFromPath() protected method

Creates a content context from the given "context path", i.e. a string used for _resolving_ (not matching) a node.
protected buildContextFromPath ( string $path, boolean $convertLiveDimensions ) : ContentContext
$path string a path containing the context, such as /sites/examplecom/home@user-johndoe or /assets/pictures/my-picture or /assets/pictures/my-picture@user-john;language=de&country=global
$convertLiveDimensions boolean Whether to parse dimensions from the context path in a non-live workspace
return Neos\Neos\Domain\Service\ContentContext based on the specified path; only evaluating the context information (i.e. everything after "@")
    protected function buildContextFromPath($path, $convertLiveDimensions)
    {
        $workspaceName = 'live';
        $dimensions = null;
        if ($path !== '' && NodePaths::isContextPath($path)) {
            $nodePathAndContext = NodePaths::explodeContextPath($path);
            $workspaceName = $nodePathAndContext['workspaceName'];
            $dimensions = $workspaceName !== 'live' || $convertLiveDimensions === true ? $nodePathAndContext['dimensions'] : null;
        }
        return $this->buildContextFromWorkspaceName($workspaceName, $dimensions);
    }