LinkNode extends AbstractNode implements NodeInterface
A link
This class is only meant to be used within EXT:install and is not part of the TYPO3 Core API.
Table of Contents
Interfaces
- NodeInterface
- Interface for structure nodes root, link, file, .
Properties
- $children : array<string|int, mixed>
- $name : string
- $parent : NodeInterface|null
- $target : string
- $targetPermission : string|null
Methods
- __construct() : mixed
- Implement constructor
- fix() : array<string|int, FlashMessage>
- Fix structure
- getAbsolutePath() : string
- Get absolute path of node
- getName() : string
- Get name
- getStatus() : array<string|int, FlashMessage>
- Get own status Returns information status if running on Windows Returns OK status if is link and possible target is correct Else returns error (not fixable)
- isWritable() : bool
- Current node is writable if parent is writable
- exists() : bool
- Checks if node exists.
- fixPermission() : FlashMessage
- Fix permission if they are not equal to target permission
- getChildren() : array<string|int, mixed>
- Get children
- getCurrentPermission() : string
- Get current permission of node
- getCurrentTarget() : false|string
- Return current target of link
- getParent() : NodeInterface|null
- Get parent
- getRelativePathBelowSiteRoot() : string
- Cut off project path from given path
- getTarget() : string
- Get link target
- getTargetPermission() : string
- Get target permission
- isLink() : bool
- Find out if node is a link
- isPermissionCorrect() : bool
- Checks if current permission are identical to target permission
- isTargetCorrect() : bool
- Checks if the real link target is identical to given target
- isWindowsOs() : bool
- Returns TRUE if OS is windows
- setTargetPermission() : mixed
- Set target permission
Properties
$children
protected
array<string|int, mixed>
$children
= []
Directories and root may have children, files and link always empty array
$name
protected
string
$name
= ''
Name
$parent
protected
NodeInterface|null
$parent
Parent object of this structure node
$target
protected
string
$target
= ''
Optional link target
$targetPermission
protected
string|null
$targetPermission
Target permissions for unix, eg. '2775' or '0664' (4 characters string)
Methods
__construct()
Implement constructor
public
__construct(array<string|int, mixed> $structure[, NodeInterface $parent = null ]) : mixed
Parameters
- $structure : array<string|int, mixed>
-
Structure array
- $parent : NodeInterface = null
-
Parent object
Tags
fix()
Fix structure
public
fix() : array<string|int, FlashMessage>
If there is nothing to fix, returns an empty array
Return values
array<string|int, FlashMessage>getAbsolutePath()
Get absolute path of node
public
getAbsolutePath() : string
Return values
stringgetName()
Get name
public
getName() : string
Return values
string —Name
getStatus()
Get own status Returns information status if running on Windows Returns OK status if is link and possible target is correct Else returns error (not fixable)
public
getStatus() : array<string|int, FlashMessage>
Return values
array<string|int, FlashMessage>isWritable()
Current node is writable if parent is writable
public
isWritable() : bool
Return values
bool —TRUE if parent is writable
exists()
Checks if node exists.
protected
exists() : bool
Returns TRUE if it is there, even if it is only a link. Does not check the type!
Return values
boolfixPermission()
Fix permission if they are not equal to target permission
protected
fixPermission() : FlashMessage
Tags
Return values
FlashMessagegetChildren()
Get children
protected
getChildren() : array<string|int, mixed>
Return values
array<string|int, mixed>getCurrentPermission()
Get current permission of node
protected
getCurrentPermission() : string
Return values
string —eg. 2775 for dirs, 0664 for files
getCurrentTarget()
Return current target of link
protected
getCurrentTarget() : false|string
Return values
false|string —target
getParent()
Get parent
protected
getParent() : NodeInterface|null
Return values
NodeInterface|nullgetRelativePathBelowSiteRoot()
Cut off project path from given path
protected
getRelativePathBelowSiteRoot([string $path = null ]) : string
Parameters
- $path : string = null
-
Given path
Tags
Return values
string —Relative path, but beginning with /
getTarget()
Get link target
protected
getTarget() : string
Return values
string —Link target
getTargetPermission()
Get target permission
protected
getTargetPermission() : string
Make sure to call octdec on the value when passing this to chmod
Return values
string —Permissions as a 4 character octal string, i.e. 2775 or 0644
isLink()
Find out if node is a link
protected
isLink() : bool
Tags
Return values
bool —TRUE if node is a link
isPermissionCorrect()
Checks if current permission are identical to target permission
protected
isPermissionCorrect() : bool
Return values
boolisTargetCorrect()
Checks if the real link target is identical to given target
protected
isTargetCorrect() : bool
Tags
Return values
bool —TRUE if target is correct
isWindowsOs()
Returns TRUE if OS is windows
protected
isWindowsOs() : bool
Return values
bool —TRUE on windows
setTargetPermission()
Set target permission
protected
setTargetPermission(string $permission) : mixed
Parameters
- $permission : string
-
Permissions as a 4 character octal string, i.e. 2775 or 0644