LinkNode extends AbstractNode implements NodeInterface

A link

Internal

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

$target

protected string $target = ''

Optional link target

$targetPermission

protected string|null $targetPermission

Target permissions for unix, eg. '2775' or '0664' (4 characters string)

Methods

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
string

getName()

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
bool

getChildren()

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

getRelativePathBelowSiteRoot()

Cut off project path from given path

protected getRelativePathBelowSiteRoot([string $path = null ]) : string
Parameters
$path : string = null

Given path

Tags
throws
InvalidArgumentException
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

isPermissionCorrect()

Checks if current permission are identical to target permission

protected isPermissionCorrect() : bool
Return values
bool

isTargetCorrect()

Checks if the real link target is identical to given target

protected isTargetCorrect() : bool
Tags
throws
InvalidArgumentException
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


        
On this page

Search results