ToolbarTree final class
Minn\Front\ToolbarTree · public/minn/src/Minn/Front/ToolbarTree.php · 90 lines
WP_Admin_Bar's nodes bound into the tree they print as, as the reference binds them (probe admin-bar): each gains its children and its type; an item's children go into its "-default" group, made when the first one arrives; a group inside a group sits next to it in a "-container", put where the outer group was; a node whose parent is missing is left out. The bar's own node accessors are used throughout, so a subclass that overrides them still sees every node it is asked for.
Constants and properties
| private | Closure $get | Promoted from the constructor. |
| private | Closure $set | Promoted from the constructor. |
Public
| new | __construct(Closure $get, Closure $set)# |
| |||||||||
| static | bind(array $nodes, Closure $get, Closure $set): ?object# | The root of the bound tree, for nodes (the bar's, a root among them) reached through the bar's accessors.
|
Internals 3
Private and protected methods: how the class does its work. Not a contract; they change whenever the code is tidied.
| private | place(object $node): void# | A node into its parent's children, through a default group or a container when it needs one. |
| private | defaultGroup(object $parent, string $groupClass): object# | The group an item's child items go into, made the first time. |
| private | container(object $group): object# | The container a group shares with the groups inside it, put where the group was. |
Nothing matches.