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.
파일 보기
프로젝트 열기: neos/neos-development-collection
1 사용 예제들
보호된 프로퍼티들
공개 메소드들
메소드 |
설명 |
|
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 |
|
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 |
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 |
|
hasSupportedScheme()
공개 메소드
Resolves a given asset:// URI to a "normal" HTTP(S) URI for the addressed asset's resource.
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 |
|