DimensionsMenuItemsImplementation
class DimensionsMenuItemsImplementation extends AbstractMenuItemsImplementation (View source)
Fusion implementation for a dimensions menu items.
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 the possible variants for that dimension will be included in the menu, any other dimensions will be kept from the current context.
Main Options:
- dimension (optional, string): name of the dimension which this menu should be limited to. Example: "language".
- presets (optional, array): If set, the presets are not loaded from the Settings, but instead taken from this property. Must be used with "dimension" set.
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 array | $items | An internal cache for the built menu items array. |
from AbstractMenuItemsImplementation |
protected NodeInterface | $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 NodeInterface[] | $currentNodeRootline | Rootline of all nodes from the current node to the site root node, keys are depth of nodes. |
from AbstractMenuItemsImplementation |
protected ConfigurationContentDimensionPresetSource | $configurationContentDimensionPresetSource | ||
protected ContentDimensionCombinator | $contentDimensionCombinator |
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
Helper Method: Calculates the state of the given menu item (node) depending on the currentNode.
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.
No description
No description
No description
Render and return a label for the $nodeInDimensions in the built menu item.
Get the current node in the given dimensions.
No description
Calculates the target dimensions for a given dimension combination.
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 string
calculateItemState(NodeInterface $node = null)
Helper Method: Calculates the state of the given menu item (node) depending on the currentNode.
This method needs to be called inside buildItems() in the subclasses.
protected bool
isNodeHidden(NodeInterface $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(NodeInterface $node)
Node Level relative to site root node.
0 = Site root node
string
getDimension()
No description
array
getPresets()
No description
array
getIncludeAllPresets()
No description
protected string
itemLabel(string $pinnedDimensionName = null, NodeInterface $nodeInDimensions = null, array $targetDimensions = null)
Render and return a label for the $nodeInDimensions in the built menu item.
protected NodeInterface|null
getNodeInDimensions(array $dimensions, array $targetDimensions)
Get the current node in the given dimensions.
If it doesn't exist the method returns null.
protected null|NodeInterface
findAcceptableNode(array $allowedCombination, array $allDimensionPresets)
No description
protected array
calculateTargetDimensionsForCombination(array $dimensionCombination)
Calculates the target dimensions for a given dimension combination.
protected bool
hasHiddenNodeParent(NodeInterface $node)
Returns TRUE if the node has a inaccessible parent.