forked from TYPO3-Documentation/render-guides
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathFileInlineNode.php
More file actions
63 lines (51 loc) · 1.5 KB
/
FileInlineNode.php
File metadata and controls
63 lines (51 loc) · 1.5 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
<?php
namespace T3Docs\Typo3DocsTheme\Nodes\Inline;
use phpDocumentor\Guides\Nodes\Inline\AbstractLinkInlineNode;
use phpDocumentor\Guides\Nodes\Inline\CrossReferenceNode;
use phpDocumentor\Guides\Nodes\Inline\PlainTextInlineNode;
use T3Docs\Typo3DocsTheme\ReferenceResolvers\ObjectsInventory\FileObject;
final class FileInlineNode extends AbstractLinkInlineNode implements CrossReferenceNode
{
public const TYPE = 'file';
private ?FileObject $fileObject = null;
public function __construct(
private string $fileLink,
private string $fileLabel,
private string $interlinkDomain,
private string $linkType
) {
parent::__construct(self::TYPE, $fileLink, [new PlainTextInlineNode($fileLabel)]);
}
public function getFileLink(): string
{
return $this->fileLink;
}
public function getLinkType(): string
{
return $this->linkType;
}
public function getFileLabel(): string
{
return $this->fileLabel;
}
public function setFileLabel(string $fileLabel): void
{
$this->fileLabel = $fileLabel;
}
public function getFileObject(): ?FileObject
{
return $this->fileObject;
}
public function setFileObject(?FileObject $fileObject): void
{
$this->fileObject = $fileObject;
}
public function getInterlinkDomain(): string
{
return $this->interlinkDomain;
}
public function getInterlinkGroup(): string
{
return 'typo3:file';
}
}