class ComponentImplementation extends JoinImplementation (View source)

A Fusion Component-Object

All properties except renderer are pushed into a context variable props afterwards the renderer is evaluated

//fusionPath renderer The variable to display a dump of. //fusionPath * generic Fusion values that will be added to the props object in the context

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 $fusionValueCache from  AbstractFusionObject
protected array internal $properties

List of properties which have been set using array access. We store this for every Fusion object in order to do things like: x = Foo { a = 'foo' b = ${this.a + 'bar'} }

from  AbstractArrayFusionObject
protected array $ignoreProperties

Properties that are ignored and not included into the props context

Methods

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

Constructor

mixed
evaluate()

Evaluate the fusion-keys and transfer the result into the context as props afterwards evaluate the renderer with this context

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)

No description

mixed
offsetGet(mixed $offset)

No description

void
offsetSet(mixed $offset, mixed $value)

No description

void
offsetUnset(mixed $offset)

No description

void
setIgnoreProperties(array $ignoreProperties = [])

No description

array
sortNestedFusionKeys()

Sort the Fusion objects inside $this->properties depending on:

  • numerical ordering
  • position meta-property

string
getGlue()

Get the glue to insert between items

array
prepare(array $context)

Prepare the context for the renderer

getProps(array $context)

Calculate the component props

mixed
render(array $context)

Evaluate the renderer with the give context and return

Details

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

Constructor

Parameters

Runtime $runtime
string $path
string $fusionObjectName

mixed evaluate()

Evaluate the fusion-keys and transfer the result into the context as props afterwards evaluate the renderer with this context

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 fusionValue() 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)

No description

Parameters

mixed $offset

Return Value

bool

mixed offsetGet(mixed $offset)

No description

Parameters

mixed $offset

Return Value

mixed

void offsetSet(mixed $offset, mixed $value)

No description

Parameters

mixed $offset
mixed $value

Return Value

void

void offsetUnset(mixed $offset)

No description

Parameters

mixed $offset

Return Value

void

void setIgnoreProperties(array $ignoreProperties = [])

No description

Parameters

array $ignoreProperties

Return Value

void

protected array sortNestedFusionKeys()

Sort the Fusion objects inside $this->properties depending on:

  • numerical ordering
  • position meta-property

This will ignore all properties defined in "@ignoreProperties" in Fusion

Return Value

array

an ordered list of key value pairs

Exceptions

Exception

See also

PositionalArraySorter

string getGlue()

Get the glue to insert between items

Return Value

string

protected array prepare(array $context)

Prepare the context for the renderer

Parameters

array $context

Return Value

array

protected ArrayAccess getProps(array $context)

Calculate the component props

Parameters

array $context

Return Value

ArrayAccess

protected mixed render(array $context)

Evaluate the renderer with the give context and return

Parameters

array $context

Return Value

mixed