PHP Класс Neos\Neos\Service\LinkingService

The target node can be provided as string or as a Node object; if not specified at all, the generated URI will refer to the current document node inside the TypoScript context. When specifying the node argument as string, the following conventions apply: *node starts with /:* The given path is an absolute node path and is treated as such. Example: /sites/acmecom/home/about/us *node does not start with /:* The given path is treated as a path relative to the current node. Examples: given that the current node is /sites/acmecom/products/, stapler results in /sites/acmecom/products/stapler, ../about results in /sites/acmecom/about/, ./neos/info results in /sites/acmecom/products/neos/info. *node starts with a tilde character (~):* The given path is treated as a path relative to the current site node. Example: given that the current node is /sites/acmecom/products/, ~/about/us results in /sites/acmecom/about/us, ~ results in /sites/acmecom.
Показать файл Открыть проект Примеры использования класса

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

Свойство Тип Описание
$assetRepository Neos\Media\Domain\Repository\AssetRepository
$lastLinkedNode Neos\ContentRepository\Domain\Model\NodeInterface
$nodeService Neos\Neos\TYPO3CR\NeosNodeServiceInterface
$nodeShortcutResolver Neos\Neos\Domain\Service\NodeShortcutResolver
$propertyMapper Neos\Flow\Property\PropertyMapper
$resourceManager Neos\Flow\ResourceManagement\ResourceManager
$siteRepository Neos\Neos\Domain\Repository\SiteRepository
$systemLogger Neos\Flow\Log\SystemLoggerInterface

Открытые методы

Метод Описание
convertUriToObject ( string | Uri $uri, Neos\ContentRepository\Domain\Model\NodeInterface $contextNode = null ) : Neos\ContentRepository\Domain\Model\NodeInterface | Neos\Media\Domain\Model\AssetInterface | null Return the object the URI addresses or NULL.
createNodeUri ( ControllerContext $controllerContext, mixed $node = null, Neos\ContentRepository\Domain\Model\NodeInterface $baseNode = null, string $format = null, boolean $absolute = false, array $arguments = [], string $section = '', boolean $addQueryString = false, array $argumentsToBeExcludedFromQueryString = [], boolean $resolveShortcuts = true ) : string Renders the URI to a given node instance or -path.
createSiteUri ( ControllerContext $controllerContext, Site $site ) : string
getLastLinkedNode ( ) : Neos\ContentRepository\Domain\Model\NodeInterface Returns the node that was last used to resolve a link to.
getScheme ( string | Uri $uri ) : string
hasSupportedScheme ( string | Uri $uri ) : boolean
resolveAssetUri ( string | Uri $uri ) : string Resolves a given asset:// URI to a "normal" HTTP(S) URI for the addressed asset's resource.
resolveNodeUri ( string | Uri $uri, Neos\ContentRepository\Domain\Model\NodeInterface $contextNode, ControllerContext $controllerContext, boolean $absolute = false ) : string Resolves a given node:// URI to a "normal" HTTP(S) URI for the addressed node.

Описание методов

convertUriToObject() публичный Метод

Return the object the URI addresses or NULL.
public convertUriToObject ( string | Uri $uri, Neos\ContentRepository\Domain\Model\NodeInterface $contextNode = null ) : Neos\ContentRepository\Domain\Model\NodeInterface | Neos\Media\Domain\Model\AssetInterface | null
$uri string | Neos\Flow\Http\Uri
$contextNode Neos\ContentRepository\Domain\Model\NodeInterface
Результат Neos\ContentRepository\Domain\Model\NodeInterface | Neos\Media\Domain\Model\AssetInterface | null

createNodeUri() публичный Метод

Renders the URI to a given node instance or -path.
public createNodeUri ( ControllerContext $controllerContext, mixed $node = null, Neos\ContentRepository\Domain\Model\NodeInterface $baseNode = null, string $format = null, boolean $absolute = false, array $arguments = [], string $section = '', boolean $addQueryString = false, array $argumentsToBeExcludedFromQueryString = [], boolean $resolveShortcuts = true ) : string
$controllerContext Neos\Flow\Mvc\Controller\ControllerContext
$node mixed A node object or a string node path, if a relative path is provided the baseNode argument is required
$baseNode Neos\ContentRepository\Domain\Model\NodeInterface
$format string Format to use for the URL, for example "html" or "json"
$absolute boolean If set, an absolute URI is rendered
$arguments array Additional arguments to be passed to the UriBuilder (for example pagination parameters)
$section string
$addQueryString boolean If set, the current query parameters will be kept in the URI
$argumentsToBeExcludedFromQueryString array arguments to be removed from the URI. Only active if $addQueryString = TRUE
$resolveShortcuts boolean INTERNAL Parameter - if FALSE, shortcuts are not redirected to their target. Only needed on rare backend occasions when we want to link to the shortcut itself.
Результат string The rendered URI

createSiteUri() публичный Метод

public createSiteUri ( ControllerContext $controllerContext, Site $site ) : string
$controllerContext Neos\Flow\Mvc\Controller\ControllerContext
$site Neos\Neos\Domain\Model\Site
Результат string

getLastLinkedNode() публичный Метод

May return NULL in case no link has been generated or an error occurred on the last linking run.
public getLastLinkedNode ( ) : Neos\ContentRepository\Domain\Model\NodeInterface
Результат Neos\ContentRepository\Domain\Model\NodeInterface

getScheme() публичный Метод

public getScheme ( string | Uri $uri ) : string
$uri string | Neos\Flow\Http\Uri
Результат string

hasSupportedScheme() публичный Метод

public hasSupportedScheme ( string | Uri $uri ) : boolean
$uri string | Neos\Flow\Http\Uri
Результат boolean

resolveAssetUri() публичный Метод

Resolves a given asset:// URI to a "normal" HTTP(S) URI for the addressed asset's resource.
public resolveAssetUri ( string | Uri $uri ) : string
$uri string | Neos\Flow\Http\Uri
Результат string

resolveNodeUri() публичный Метод

Resolves a given node:// URI to a "normal" HTTP(S) URI for the addressed node.
public resolveNodeUri ( string | Uri $uri, Neos\ContentRepository\Domain\Model\NodeInterface $contextNode, ControllerContext $controllerContext, boolean $absolute = false ) : string
$uri string | Neos\Flow\Http\Uri
$contextNode Neos\ContentRepository\Domain\Model\NodeInterface
$controllerContext Neos\Flow\Mvc\Controller\ControllerContext
$absolute boolean
Результат string

Описание свойств

$assetRepository защищенное свойство

protected AssetRepository,Neos\Media\Domain\Repository $assetRepository
Результат Neos\Media\Domain\Repository\AssetRepository

$lastLinkedNode защищенное свойство

protected NodeInterface,Neos\ContentRepository\Domain\Model $lastLinkedNode
Результат Neos\ContentRepository\Domain\Model\NodeInterface

$nodeService защищенное свойство

protected NeosNodeServiceInterface,Neos\Neos\TYPO3CR $nodeService
Результат Neos\Neos\TYPO3CR\NeosNodeServiceInterface

$nodeShortcutResolver защищенное свойство

protected NodeShortcutResolver,Neos\Neos\Domain\Service $nodeShortcutResolver
Результат Neos\Neos\Domain\Service\NodeShortcutResolver

$propertyMapper защищенное свойство

protected PropertyMapper,Neos\Flow\Property $propertyMapper
Результат Neos\Flow\Property\PropertyMapper

$resourceManager защищенное свойство

protected ResourceManager,Neos\Flow\ResourceManagement $resourceManager
Результат Neos\Flow\ResourceManagement\ResourceManager

$siteRepository защищенное свойство

protected SiteRepository,Neos\Neos\Domain\Repository $siteRepository
Результат Neos\Neos\Domain\Repository\SiteRepository

$systemLogger защищенное свойство

protected SystemLoggerInterface,Neos\Flow\Log $systemLogger
Результат Neos\Flow\Log\SystemLoggerInterface