PHP Класс Neos\Neos\Routing\FrontendNodeRoutePartHandler

Наследование: extends Neos\Flow\Mvc\Routing\DynamicRoutePart, implements FrontendNodeRoutePartHandlerInterface
Показать файл Открыть проект

Защищенные свойства (Protected)

Свойство Тип Описание
$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