DimensionsMenuItemsImplementation
class DimensionsMenuItemsImplementation extends AbstractMenuItemsImplementation (View source)
Fusion implementation for a dimensions menu.
The items generated by this menu will be all possible variants (according to the configured dimensions and presets) of the given node (including the given node).
If a 'dimension' is configured via Fusion, only those variants of the the current subgraph that match its other dimension values will be evaluated
Main Options:
- dimension (optional, string): Name of the dimension which this menu should be limited to. Example: "language".
- values (optional, array): If set, only the given dimension values for the given dimension will be evaluated
- includeAllPresets (optional, bool): If set, generalizations in the other dimensions will be evaluated additionally if necessary to fetch a result for a given dimension value
Constants
STATE_NORMAL |
|
STATE_CURRENT |
|
STATE_ACTIVE |
|
STATE_ABSENT |
|
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 MenuItem> | $items | An internal cache for the built menu items array. |
from AbstractMenuItemsImplementation |
protected Node | $currentNode | from AbstractMenuItemsImplementation | |
protected int | $currentLevel | Internal cache for the currentLevel tsValue. |
from AbstractMenuItemsImplementation |
protected bool | $renderHiddenInIndex | Internal cache for the renderHiddenInIndex property. |
from AbstractMenuItemsImplementation |
protected Node[] | $currentNodeRootline | Rootline of all nodes from the current node to the site root node, keys are depth of nodes. |
from AbstractMenuItemsImplementation |
protected | $contentRepositoryRegistry | from AbstractMenuItemsImplementation |
Methods
Returns the items as result of the fusion object.
Return the Fusion value relative to this Fusion object (with processors etc applied).
Dummy implementation of ArrayAccess to allow this.XXX access in processors.
Dummy implementation of ArrayAccess to allow this.XXX access in processors.
Dummy implementation of ArrayAccess to allow this.XXX access in processors.
Dummy implementation of ArrayAccess to allow this.XXX access in processors.
Should nodes that have "hiddenInIndex" set still be visible in this menu.
Main API method which sends the to-be-rendered data to Fluid
Builds the array of Menu items for this variant menu
Return TRUE/FALSE if the node is currently hidden or not in the menu; taking the "renderHiddenInIndex" configuration of the Menu Fusion object into account.
Get the rootline from the current node up to the site node.
Node Level relative to site root node.
No description
No description
No description
No description
No description
In some cases generalization of the other dimension values is feasible to find a dimension space point in which a variant can be resolved
No description
No description
Details
__construct(Runtime $runtime, string $path, string $fusionObjectName)
Constructor
mixed
evaluate()
Returns the items as result of the fusion object.
Runtime
getRuntime()
Get the Fusion runtime this object was created in.
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.
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.
bool
getRenderHiddenInIndex()
Should nodes that have "hiddenInIndex" set still be visible in this menu.
array
getItems()
Main API method which sends the to-be-rendered data to Fluid
protected array
buildItems()
Builds the array of Menu items for this variant menu
protected bool
isNodeHidden(Node $node)
Return TRUE/FALSE if the node is currently hidden or not in the menu; taking the "renderHiddenInIndex" configuration of the Menu Fusion object into account.
This method needs to be called inside buildItems() in the subclasses.
protected array
getCurrentNodeRootline()
Get the rootline from the current node up to the site node.
protected int
getNodeLevelInSite(Node $node)
Node Level relative to site root node.
0 = Site root node
array
getDimension()
No description
protected bool
isDimensionSpacePointRelevant(DimensionSpacePoint $dimensionSpacePoint)
No description
protected Node|null
findClosestGeneralizationMatchingDimensionValue(DimensionSpacePoint $dimensionSpacePoint, ContentDimensionId $contentDimensionIdentifier, NodeAggregateId $nodeAggregateIdentifier, DimensionsMenuItemsImplementationInternals $dimensionMenuItemsImplementationInternals, ContentRepository $contentRepository)
No description
protected array
determineMetadata(DimensionSpacePoint $dimensionSpacePoint, DimensionsMenuItemsImplementationInternals $dimensionMenuItemsImplementationInternals)
No description
protected string
determineLabel(Node|null $variant = null, array $metadata = [])
No description
protected string
calculateItemState(Node|null $variant = null)
No description
protected bool
includeGeneralizations()
In some cases generalization of the other dimension values is feasible to find a dimension space point in which a variant can be resolved
protected ContentDimensionId|null
getContentDimensionIdentifierToLimitTo()
No description
protected array
getValuesToRestrictTo()
No description