AbstractMenuItemsImplementation
abstract class AbstractMenuItemsImplementation extends AbstractFusionObject (View source)
Base class for MenuItems and DimensionsMenuItems
Main Options:
- renderHiddenInIndex: if true, hidden-in-index nodes will be shown in the menu. false by default.
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 | $tsValueCache | from AbstractFusionObject | |
protected array | $items | An internal cache for the built menu items array. |
|
protected NodeInterface | $currentNode | ||
protected int | $currentLevel | Internal cache for the currentLevel tsValue. |
|
protected bool | $renderHiddenInIndex | Internal cache for the renderHiddenInIndex property. |
|
protected NodeInterface[] | $currentNodeRootline | Rootline of all nodes from the current node to the site root node, keys are depth of nodes. |
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.
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.
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 tsValue() 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
abstract protected array
buildItems()
Builds the array of menu items containing those items which match the configuration set for this Menu object.
Must be overridden in subclasses.
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