PHP Class 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.
Afficher le fichier Open project: neos/neos-development-collection Class Usage Examples

Protected Properties

Свойство Type Description
$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

Méthodes publiques

Méthode Description
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.

Method Details

convertUriToObject() public méthode

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
Résultat Neos\ContentRepository\Domain\Model\NodeInterface | Neos\Media\Domain\Model\AssetInterface | null

createNodeUri() public méthode

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.
Résultat string The rendered URI

createSiteUri() public méthode

public createSiteUri ( ControllerContext $controllerContext, Site $site ) : string
$controllerContext Neos\Flow\Mvc\Controller\ControllerContext
$site Neos\Neos\Domain\Model\Site
Résultat string

getLastLinkedNode() public méthode

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
Résultat Neos\ContentRepository\Domain\Model\NodeInterface

getScheme() public méthode

public getScheme ( string | Uri $uri ) : string
$uri string | Neos\Flow\Http\Uri
Résultat string

hasSupportedScheme() public méthode

public hasSupportedScheme ( string | Uri $uri ) : boolean
$uri string | Neos\Flow\Http\Uri
Résultat boolean

resolveAssetUri() public méthode

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
Résultat string

resolveNodeUri() public méthode

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
Résultat string

Property Details

$assetRepository protected_oe property

protected AssetRepository,Neos\Media\Domain\Repository $assetRepository
Résultat Neos\Media\Domain\Repository\AssetRepository

$lastLinkedNode protected_oe property

protected NodeInterface,Neos\ContentRepository\Domain\Model $lastLinkedNode
Résultat Neos\ContentRepository\Domain\Model\NodeInterface

$nodeService protected_oe property

protected NeosNodeServiceInterface,Neos\Neos\TYPO3CR $nodeService
Résultat Neos\Neos\TYPO3CR\NeosNodeServiceInterface

$nodeShortcutResolver protected_oe property

protected NodeShortcutResolver,Neos\Neos\Domain\Service $nodeShortcutResolver
Résultat Neos\Neos\Domain\Service\NodeShortcutResolver

$propertyMapper protected_oe property

protected PropertyMapper,Neos\Flow\Property $propertyMapper
Résultat Neos\Flow\Property\PropertyMapper

$resourceManager protected_oe property

protected ResourceManager,Neos\Flow\ResourceManagement $resourceManager
Résultat Neos\Flow\ResourceManagement\ResourceManager

$siteRepository protected_oe property

protected SiteRepository,Neos\Neos\Domain\Repository $siteRepository
Résultat Neos\Neos\Domain\Repository\SiteRepository

$systemLogger protected_oe property

protected SystemLoggerInterface,Neos\Flow\Log $systemLogger
Résultat Neos\Flow\Log\SystemLoggerInterface