MenuItemsImplementation
class MenuItemsImplementation extends AbstractMenuItemsImplementation (View source)
A Fusion Menu object
Constants
STATE_NORMAL |
|
STATE_CURRENT |
|
STATE_ACTIVE |
|
STATE_ABSENT |
|
MAXIMUM_LEVELS_LIMIT |
Hard limit for the maximum number of levels supported by this menu |
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 | |
protected Node | $startingPoint | Internal cache for the startingPoint tsValue. |
|
protected int | $lastLevel | Internal cache for the lastLevel value. |
|
protected int | $maximumLevels | Internal cache for the maximumLevels tsValue. |
|
protected | $nodeTypeConstraints | Runtime cache for the node type constraints to be applied |
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 containing those items which match the configuration set for this Menu object.
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.
The last navigation level which should be rendered.
NodeType filter for nodes displayed in menu
Maximum number of levels which should be rendered in this menu.
Return evaluated lastLevel value.
No description
No description
No description
Find the starting point for this menu. depending on given startingPoint If startingPoint is given, this is taken as starting point for this menu level, as a fallback the Fusion context variable node is used.
No description
the callback always gets the current Node passed as first parameter, and then its parent, and its parent etc etc.
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 containing those items which match the configuration set for this Menu object.
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
int
getEntryLevel()
The last navigation level which should be rendered.
1 = first level of the site 2 = second level of the site ... 0 = same level as the current page -1 = one level above the current page -2 = two levels above the current page ...
string
getFilter()
NodeType filter for nodes displayed in menu
int
getMaximumLevels()
Maximum number of levels which should be rendered in this menu.
int
getLastLevel()
Return evaluated lastLevel value.
Node|null
getStartingPoint()
No description
array|null
getItemCollection()
No description
protected MenuItem
traverseChildren(Subtree $subtree)
No description
protected Node|null
findMenuStartingPoint()
Find the starting point for this menu. depending on given startingPoint If startingPoint is given, this is taken as starting point for this menu level, as a fallback the Fusion context variable node is used.
If entryLevel is configured this will be taken into account as well.
protected NodeTypeConstraints
getNodeTypeConstraints()
No description
protected void
traverseUpUntilCondition(Node $node, Closure $callback)
the callback always gets the current Node passed as first parameter, and then its parent, and its parent etc etc.
Until it has reached the root, or the return value of the closure is FALSE.
protected string
buildUri(Node $node)
No description