PHP 클래스 Neos\Neos\Routing\FrontendNodeRoutePartHandler

상속: extends Neos\Flow\Mvc\Routing\DynamicRoutePart, implements FrontendNodeRoutePartHandlerInterface
파일 보기 프로젝트 열기: neos/neos-development-collection

보호된 프로퍼티들

프로퍼티 타입 설명
$contentDimensionPresetSource Neos\Neos\Domain\Service\ContentDimensionPresetSourceInterface
$contextFactory Neos\Neos\Domain\Service\ContentContextFactory
$domainRepository Neos\Neos\Domain\Repository\DomainRepository
$securityContext Neos\Flow\Security\Context
$siteRepository Neos\Neos\Domain\Repository\SiteRepository
$supportEmptySegmentForDimensions boolean
$systemLogger Neos\Flow\Log\SystemLoggerInterface

보호된 메소드들

메소드 설명
buildContextFromPath ( string $path, boolean $convertLiveDimensions ) : ContentContext Creates a content context from the given "context path", i.e. a string used for _resolving_ (not matching) a node.
buildContextFromRequestPath ( &$requestPath ) : ContentContext Creates a content context from the given request path, considering possibly mentioned content dimension values.
buildContextFromWorkspaceName ( string $workspaceName, array $dimensions = null ) : ContentContext
buildContextFromWorkspaceNameAndDimensions ( string $workspaceName, array $dimensionsAndDimensionValues ) : ContentContext Sets context properties like "invisibleContentShown" according to the workspace (live or not) and returns a ContentContext object.
convertRequestPathToNode ( string $requestPath ) : Neos\ContentRepository\Domain\Model\NodeInterface Returns the initialized node that is referenced by $requestPath, based on the node's "uriPathSegment" property.
findValueToMatch ( string $requestPath ) : string Extracts the node path from the request path.
getRelativeNodePathByUriPathSegmentProperties ( Neos\ContentRepository\Domain\Model\NodeInterface $siteNode, string $relativeRequestPath ) : string Builds a node path which matches the given request path.
getRequestPathByNode ( Neos\ContentRepository\Domain\Model\NodeInterface $node ) : string Renders a request path based on the "uriPathSegment" properties of the nodes leading to the given node.
getUriSegmentForDimensions ( array $dimensionsValues, boolean $currentNodeIsSiteNode ) : string Find a URI segment in the content dimension presets for the given "language" dimension values
matchValue ( string $requestPath ) : boolean Matches a frontend URI pointing to a node (for example a page).
onlyMatchSiteNodes ( ) : boolean Whether the current route part should only match/resolve site nodes (e.g. the homepage)
parseDimensionsAndNodePathFromRequestPath ( &$requestPath ) : array Choose between default method for parsing dimensions or the one which allows uriSegment to be empty for default preset.
parseDimensionsAndNodePathFromRequestPathAllowingEmptySegment ( &$requestPath ) : array Parses the given request path and checks if the first path segment is one or a set of content dimension preset identifiers. If that is the case, the return value is an array of dimension names and their preset URI segments.
parseDimensionsAndNodePathFromRequestPathAllowingNonUniqueSegment ( &$requestPath ) : array Parses the given request path and checks if the first path segment is one or a set of content dimension preset identifiers. If that is the case, the return value is an array of dimension names and their preset URI segments.
removeContextFromPath ( string $path ) : string
resolveRoutePathForNode ( Neos\ContentRepository\Domain\Model\NodeInterface $node ) : string Resolves the request path, also known as route path, identifying the given node.
resolveValue ( mixed $node ) : boolean Checks, whether given value is a Node object and if so, sets $this->value to the respective node path.

메소드 상세

buildContextFromPath() 보호된 메소드

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
리턴 Neos\Neos\Domain\Service\ContentContext based on the specified path; only evaluating the context information (i.e. everything after "@")

buildContextFromRequestPath() 보호된 메소드

Creates a content context from the given request path, considering possibly mentioned content dimension values.
protected buildContextFromRequestPath ( &$requestPath ) : ContentContext
리턴 Neos\Neos\Domain\Service\ContentContext The built content context

buildContextFromWorkspaceName() 보호된 메소드

protected buildContextFromWorkspaceName ( string $workspaceName, array $dimensions = null ) : ContentContext
$workspaceName string
$dimensions array
리턴 Neos\Neos\Domain\Service\ContentContext

buildContextFromWorkspaceNameAndDimensions() 보호된 메소드

Sets context properties like "invisibleContentShown" according to the workspace (live or not) and returns a ContentContext object.
protected buildContextFromWorkspaceNameAndDimensions ( string $workspaceName, array $dimensionsAndDimensionValues ) : ContentContext
$workspaceName string Name of the workspace to use in the context
$dimensionsAndDimensionValues array An array of dimension names (index) and their values (array of strings). See also: ContextFactory
리턴 Neos\Neos\Domain\Service\ContentContext

convertRequestPathToNode() 보호된 메소드

Note that $requestPath will be modified (passed by reference) by buildContextFromRequestPath().
protected convertRequestPathToNode ( string $requestPath ) : Neos\ContentRepository\Domain\Model\NodeInterface
$requestPath string The request path, for example /the/node/path@some-workspace
리턴 Neos\ContentRepository\Domain\Model\NodeInterface

findValueToMatch() 보호된 메소드

Extracts the node path from the request path.
protected findValueToMatch ( string $requestPath ) : string
$requestPath string The request path to be matched
리턴 string value to match, or an empty string if $requestPath is empty or split string was not found

getRelativeNodePathByUriPathSegmentProperties() 보호된 메소드

This method traverses the segments of the given request path and tries to find nodes on the current level which have a matching "uriPathSegment" property. If no node could be found which would match the given request path, false is returned.
protected getRelativeNodePathByUriPathSegmentProperties ( Neos\ContentRepository\Domain\Model\NodeInterface $siteNode, string $relativeRequestPath ) : string
$siteNode Neos\ContentRepository\Domain\Model\NodeInterface The site node, used as a starting point while traversing the tree
$relativeRequestPath string The request path, relative to the site's root path
리턴 string

getRequestPathByNode() 보호된 메소드

Renders a request path based on the "uriPathSegment" properties of the nodes leading to the given node.
protected getRequestPathByNode ( Neos\ContentRepository\Domain\Model\NodeInterface $node ) : string
$node Neos\ContentRepository\Domain\Model\NodeInterface The node where the generated path should lead to
리턴 string A relative request path

getUriSegmentForDimensions() 보호된 메소드

This will do a reverse lookup from actual dimension values to a preset and fall back to the default preset if none can be found.
protected getUriSegmentForDimensions ( array $dimensionsValues, boolean $currentNodeIsSiteNode ) : string
$dimensionsValues array An array of dimensions and their values, indexed by dimension name
$currentNodeIsSiteNode boolean If the current node is actually the site node
리턴 string

matchValue() 보호된 메소드

This function tries to find a matching node by the given request path. If one was found, its absolute context node path is set in $this->value and true is returned. Note that this matcher does not check if access to the resolved workspace or node is allowed because at the point in time the route part handler is invoked, the security framework is not yet fully initialized.
protected matchValue ( string $requestPath ) : boolean
$requestPath string The request path (without leading "/", relative to the current Site Node)
리턴 boolean true if the $requestPath could be matched, otherwise false

onlyMatchSiteNodes() 보호된 메소드

Whether the current route part should only match/resolve site nodes (e.g. the homepage)
protected onlyMatchSiteNodes ( ) : boolean
리턴 boolean

parseDimensionsAndNodePathFromRequestPath() 보호된 메소드

Choose between default method for parsing dimensions or the one which allows uriSegment to be empty for default preset.
protected parseDimensionsAndNodePathFromRequestPath ( &$requestPath ) : array
리턴 array An array of dimension name => dimension values (array of string)

parseDimensionsAndNodePathFromRequestPathAllowingEmptySegment() 보호된 메소드

Allows uriSegment to be empty for default dimension preset. If the first path segment contained content dimension information, it is removed from &$requestPath.
protected parseDimensionsAndNodePathFromRequestPathAllowingEmptySegment ( &$requestPath ) : array
리턴 array An array of dimension name => dimension values (array of string)

parseDimensionsAndNodePathFromRequestPathAllowingNonUniqueSegment() 보호된 메소드

Doesn't allow empty uriSegment, but allows uriSegment to be not unique across presets. If the first path segment contained content dimension information, it is removed from &$requestPath.
protected parseDimensionsAndNodePathFromRequestPathAllowingNonUniqueSegment ( &$requestPath ) : array
리턴 array An array of dimension name => dimension values (array of string)

removeContextFromPath() 보호된 메소드

protected removeContextFromPath ( string $path ) : string
$path string an absolute or relative node path which possibly contains context information, for example "/sites/somesite/the/node/path@some-workspace"
리턴 string the same path without context information

resolveRoutePathForNode() 보호된 메소드

A path is built, based on the uri path segment properties of the parents of and the given node itself. If content dimensions are configured, the first path segment will the identifiers of the dimension values according to the current context.
protected resolveRoutePathForNode ( Neos\ContentRepository\Domain\Model\NodeInterface $node ) : string
$node Neos\ContentRepository\Domain\Model\NodeInterface The node where the generated path should lead to
리턴 string The relative route path, possibly prefixed with a segment for identifying the current content dimension values

resolveValue() 보호된 메소드

In order to render a suitable frontend URI, this function strips off the path to the site node and only keeps the actual node path relative to that site node. In practice this function would set $this->value as follows: absolute node path: /sites/neostypo3org/homepage/about $this->value: homepage/about absolute node path: /sites/neostypo3org/homepage/about@user-admin $this->value: homepage/about@user-admin
protected resolveValue ( mixed $node ) : boolean
$node mixed Either a Node object or an absolute context node path
리턴 boolean true if value could be resolved successfully, otherwise false.

프로퍼티 상세

$contentDimensionPresetSource 보호되어 있는 프로퍼티

protected ContentDimensionPresetSourceInterface,Neos\Neos\Domain\Service $contentDimensionPresetSource
리턴 Neos\Neos\Domain\Service\ContentDimensionPresetSourceInterface

$contextFactory 보호되어 있는 프로퍼티

protected ContentContextFactory,Neos\Neos\Domain\Service $contextFactory
리턴 Neos\Neos\Domain\Service\ContentContextFactory

$domainRepository 보호되어 있는 프로퍼티

protected DomainRepository,Neos\Neos\Domain\Repository $domainRepository
리턴 Neos\Neos\Domain\Repository\DomainRepository

$securityContext 보호되어 있는 프로퍼티

protected Context,Neos\Flow\Security $securityContext
리턴 Neos\Flow\Security\Context

$siteRepository 보호되어 있는 프로퍼티

protected SiteRepository,Neos\Neos\Domain\Repository $siteRepository
리턴 Neos\Neos\Domain\Repository\SiteRepository

$supportEmptySegmentForDimensions 보호되어 있는 프로퍼티

protected bool $supportEmptySegmentForDimensions
리턴 boolean

$systemLogger 보호되어 있는 프로퍼티

protected SystemLoggerInterface,Neos\Flow\Log $systemLogger
리턴 Neos\Flow\Log\SystemLoggerInterface