Provides a value object to model an element in a menu link tree.
\Drupal\Core\Menu\MenuLinkTreeElement objects represent a menu link's data. Objects of this class provide complimentary data: the placement in a tree. Therefore, we can summarize this split as follows:
\Drupal\Core\Menu\MenuTreeStorage::loadTreeData()
Name | Modifiers | Type | Description |
---|---|---|---|
MenuLinkTreeElement::$access | public | property | Whether this link is accessible by the current user. |
MenuLinkTreeElement::$depth | public | property | The depth of this link relative to the root of the tree. |
MenuLinkTreeElement::$hasChildren | public | property | Whether this link has any children at all. |
MenuLinkTreeElement::$inActiveTrail | public | property | Whether this link is in the active trail. |
MenuLinkTreeElement::$link | public | property | The menu link for this element in a menu link tree. |
MenuLinkTreeElement::$options | public | property | Additional options for this link. |
MenuLinkTreeElement::$subtree | public | property | The subtree of this element in the menu link tree (this link's children). |
MenuLinkTreeElement::count | public | function | Counts all menu links in the current subtree. |
MenuLinkTreeElement::__construct | public | function | Constructs a new \Drupal\Core\Menu\MenuLinkTreeElement. |
© 2001–2016 by the original authors
Licensed under the GNU General Public License, version 2 and later.
Drupal is a registered trademark of Dries Buytaert.
https://api.drupal.org/api/drupal/core!lib!Drupal!Core!Menu!MenuLinkTreeElement.php/class/MenuLinkTreeElement/8.1.x