Constants

VERSION_0

VERSION_0

VERSION_1

VERSION_1

VERSION_2

VERSION_2

VERSION_3

VERSION_3

BACKGROUND_0

BACKGROUND_0

BACKGROUND_1

BACKGROUND_1

BACKGROUND_STARS

BACKGROUND_STARS

BACKGROUND_STATIONS

BACKGROUND_STATIONS

BACKGROUND_TITLE

BACKGROUND_TITLE

Properties

$maniaLinkId

$maniaLinkId : string

Type

string — ManiaLink ID

$version

$version : integer

Type

integer — ManiaLink version

$name

$name : string

Type

string — ManiaLink name

$background

$background : string

Type

string — Background

$navigable3d

$navigable3d : boolean

Type

boolean — 3d navigable

$timeout

$timeout : integer

Type

integer — Timeout

$children

$children : array<mixed,\FML\Types\Renderable>

Type

array<mixed,\FML\Types\Renderable> — Children

Methods

create()

create(string  $maniaLinkId = null, integer  $version = \FML\ManiaLink::VERSION_1, string  $name = null, array<mixed,\FML\Types\Renderable>  $children = null) : static

Create a new ManiaLink

Parameters

string $maniaLinkId

(optional) ManiaLink ID

integer $version

(optional) Version

string $name

(optional) Name

array<mixed,\FML\Types\Renderable> $children

(optional) Children

Returns

static

__construct()

__construct(string  $maniaLinkId = null, integer  $version = \FML\ManiaLink::VERSION_3, string  $name = null, array<mixed,\FML\Types\Renderable>  $children = null) 

Construct a new ManiaLink

Parameters

string $maniaLinkId

(optional) ManiaLink ID

integer $version

(optional) Version

string $name

(optional) Name

array<mixed,\FML\Types\Renderable> $children

(optional) Children

getId()

getId() : string

Get the ID

Returns

string

setId()

setId(string  $maniaLinkId) : static

Set the ID

Parameters

string $maniaLinkId

ManiaLink ID

Returns

static

getVersion()

getVersion() : integer

Get the version

Returns

integer

setVersion()

setVersion(integer  $version) : static

Set the version

Parameters

integer $version

ManiaLink version

Returns

static

getName()

getName() : string

Get the name

Returns

string

setName()

setName(string  $name) : static

Set the name

Parameters

string $name

ManiaLink Name

Returns

static

getBackground()

getBackground() : string

Get the background

Returns

string

setBackground()

setBackground(string  $background) : static

Set the background

Parameters

string $background

Background value

Returns

static

getNavigable3d()

getNavigable3d() : boolean

Get navigable3d

Returns

boolean

setNavigable3d()

setNavigable3d(boolean  $navigable3d) : static

Set navigable3d

Parameters

boolean $navigable3d

If the ManiaLink should be 3d navigable

Returns

static

getTimeout()

getTimeout() : integer

Get the timeout

Returns

integer

setTimeout()

setTimeout(integer  $timeout) : static

Set the timeout

Parameters

integer $timeout

Timeout duration

Returns

static

getChildren()

getChildren() : array<mixed,\FML\Types\Renderable>

Get children

Returns

array<mixed,\FML\Types\Renderable>

add()

add(\FML\Types\Renderable  $child) : static

Add a child

Parameters

\FML\Types\Renderable $child

Child Element to add

Returns

static

addChild()

addChild(\FML\Types\Renderable  $child) : static

Add a child

Parameters

\FML\Types\Renderable $child

Child Element to add

Returns

static

addChildren()

addChildren(array<mixed,\FML\Types\Renderable>  $children) : static

Add children

Parameters

array<mixed,\FML\Types\Renderable> $children

Child Elements to add

Returns

static

setChildren()

setChildren(array<mixed,\FML\Types\Renderable>  $children) : static

Set children

Parameters

array<mixed,\FML\Types\Renderable> $children

Child Elements

Returns

static

removeChildren()

removeChildren() : static

Remove all children

Returns

static

removeAllChildren()

removeAllChildren() : static

Remove all children

Returns

static

getDico()

getDico(boolean  $createIfEmpty = true) : \FML\Elements\Dico

Get the Dictionary

Parameters

boolean $createIfEmpty

(optional) If the Dico should be created if it doesn't exist yet

Returns

\FML\Elements\Dico

setDico()

setDico(\FML\Elements\Dico  $dico = null) : static

Set the Dictionary

Parameters

\FML\Elements\Dico $dico

Dictionary

Returns

static

getStylesheet()

getStylesheet(  $createIfEmpty = true) : \FML\Stylesheet\Stylesheet

Get the Stylesheet

Parameters

$createIfEmpty

Returns

\FML\Stylesheet\Stylesheet

setStylesheet()

setStylesheet(\FML\Stylesheet\Stylesheet  $stylesheet = null) : static

Set the Stylesheet

Parameters

\FML\Stylesheet\Stylesheet $stylesheet

Stylesheet

Returns

static

createStylesheet()

createStylesheet() : \FML\Stylesheet\Stylesheet

Create and assign a new Stylesheet if necessary

Returns

\FML\Stylesheet\Stylesheet

getScript()

getScript(boolean  $createIfEmpty = true) : \FML\Script\Script

Get the Script

Parameters

boolean $createIfEmpty

(optional) Create the script if it's not set yet

Returns

\FML\Script\Script

setScript()

setScript(\FML\Script\Script  $script = null) : static

Set the Script

Parameters

\FML\Script\Script $script

Script

Returns

static

createScript()

createScript() : \FML\Script\Script

Create and assign a new Script if necessary

Returns

\FML\Script\Script

render()

render(boolean  $echo = false, \DOMDocument  $domDocument = null) : \DOMDocument

Render the ManiaLink

Parameters

boolean $echo

(optional) If the XML text should be echoed and the Content-Type header should be set

\DOMDocument $domDocument

(optional) DOMDocument for which the ManiaLink should be rendered

Returns

\DOMDocument

__toString()

__toString() : string

Get the string representation

Returns

string