Skip to content

Commit c5da4fd

Browse files
authored
Merge pull request #15 from PackageFactory/nodeUriFormat
Add support for node URI formats
2 parents 9cff1d5 + ab2bed1 commit c5da4fd

2 files changed

Lines changed: 5 additions & 3 deletions

File tree

Classes/Fusion/UriServiceInterface.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,10 @@ interface UriServiceInterface
1515
/**
1616
* @param TraversableNodeInterface $documentNode
1717
* @param boolean $absolute
18+
* @param string|null $format
1819
* @return string
1920
*/
20-
public function getNodeUri(TraversableNodeInterface $documentNode, bool $absolute = false): string;
21+
public function getNodeUri(TraversableNodeInterface $documentNode, bool $absolute = false, ?string $format = null): string;
2122

2223
/**
2324
* @param string $packageKey

Classes/Infrastructure/UriService.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,7 @@ final class UriService implements UriServiceInterface
5656
/**
5757
* @param TraversableNodeInterface $documentNode
5858
* @param bool $absolute
59+
* @param string $format
5960
* @return string
6061
* @throws Http\Exception
6162
* @throws Mvc\Routing\Exception\MissingActionNameException
@@ -64,9 +65,9 @@ final class UriService implements UriServiceInterface
6465
* @throws \Neos\Flow\Security\Exception
6566
* @throws \Neos\Neos\Exception
6667
*/
67-
public function getNodeUri(TraversableNodeInterface $documentNode, bool $absolute = false): string
68+
public function getNodeUri(TraversableNodeInterface $documentNode, bool $absolute = false, ?string $format = null): string
6869
{
69-
return $this->linkingService->createNodeUri($this->getControllerContext(), $documentNode, null, null, $absolute);
70+
return $this->linkingService->createNodeUri($this->getControllerContext(), $documentNode, null, $format, $absolute);
7071
}
7172

7273
/**

0 commit comments

Comments
 (0)