class TagImplementation extends AbstractFusionObject (View source)

A Fusion object for tag based content

//tsPath attributes An array with attributes for this tag (optional) //tsPath content Content for the body of the tag (optional)

Properties

protected Runtime $runtime from  AbstractFusionObject
protected string $path

The Fusion path currently being rendered

from  AbstractFusionObject
protected string $fusionObjectName

Name of this Fusion object, like Neos.Neos:Text

from  AbstractFusionObject
protected array $tsValueCache from  AbstractFusionObject
static protected array $SELF_CLOSING_TAGS

List of self-closing tags

Methods

__construct(Runtime $runtime, string $path, string $fusionObjectName)

Constructor

mixed
evaluate()

Return a tag

getRuntime()

Get the Fusion runtime this object was created in.

mixed
fusionValue(string $path)

Return the Fusion value relative to this Fusion object (with processors etc applied).

bool
offsetExists(mixed $offset)

Dummy implementation of ArrayAccess to allow this.XXX access in processors.

mixed
offsetGet(mixed $offset)

Dummy implementation of ArrayAccess to allow this.XXX access in processors.

void
offsetSet(mixed $offset, mixed $value)

Dummy implementation of ArrayAccess to allow this.XXX access in processors.

void
offsetUnset(mixed $offset)

Dummy implementation of ArrayAccess to allow this.XXX access in processors.

string
getTagName()

The tag name (e.g. 'body', 'head', 'title', ...)

bool
getOmitClosingTag()

Whether to leave out the closing tag (defaults to false)

bool
isSelfClosingTag(string $tagName)

Whether to force a self closing tag (e.g. '

')

string
getContent()

The tag content

iterable|string
getAttributes()

The tag attributes dataStructure If anything but an iterable is returned the value is casted to string

bool
getAllowEmptyAttributes()

Whether empty attributes (HTML5 syntax) should be allowed

string
renderAttributes(iterable $attributes, bool $allowEmpty = true)

Render the tag attributes for the given key->values as atring, if an value is an iterable it will be concatenated with spaces as seperator

Details

__construct(Runtime $runtime, string $path, string $fusionObjectName)

Constructor

Parameters

Runtime $runtime
string $path
string $fusionObjectName

mixed evaluate()

Return a tag

Return Value

mixed

Runtime getRuntime()

Get the Fusion runtime this object was created in.

Return Value

Runtime

protected mixed fusionValue(string $path)

Return the Fusion value relative to this Fusion object (with processors etc applied).

Note that subsequent calls of tsValue() with the same Fusion path will return the same values since the first evaluated value will be cached in memory.

Parameters

string $path

Return Value

mixed

bool offsetExists(mixed $offset)

Dummy implementation of ArrayAccess to allow this.XXX access in processors.

Parameters

mixed $offset

Return Value

bool

mixed offsetGet(mixed $offset)

Dummy implementation of ArrayAccess to allow this.XXX access in processors.

Parameters

mixed $offset

Return Value

mixed

void offsetSet(mixed $offset, mixed $value)

Dummy implementation of ArrayAccess to allow this.XXX access in processors.

Parameters

mixed $offset
mixed $value

Return Value

void

void offsetUnset(mixed $offset)

Dummy implementation of ArrayAccess to allow this.XXX access in processors.

Parameters

mixed $offset

Return Value

void

string getTagName()

The tag name (e.g. 'body', 'head', 'title', ...)

Return Value

string

bool getOmitClosingTag()

Whether to leave out the closing tag (defaults to false)

Return Value

bool

bool isSelfClosingTag(string $tagName)

Whether to force a self closing tag (e.g. '

')

Parameters

string $tagName

Return Value

bool

protected string getContent()

The tag content

Return Value

string

protected iterable|string getAttributes()

The tag attributes dataStructure If anything but an iterable is returned the value is casted to string

Return Value

iterable|string

protected bool getAllowEmptyAttributes()

Whether empty attributes (HTML5 syntax) should be allowed

Return Value

bool

protected string renderAttributes(iterable $attributes, bool $allowEmpty = true)

Render the tag attributes for the given key->values as atring, if an value is an iterable it will be concatenated with spaces as seperator

Parameters

iterable $attributes
bool $allowEmpty

Return Value

string