You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'd like to be able to override how MenuItem instances are created. Right now, new $this->MenuItemClass($item) is bound up inside Menu::order_children. If it were in its own method, I could override that in order to, for instance, polymorphically create different kinds of MenuItems:
In this example, LoginMenuItem might return a different title/URL depending on the user's login state. But we don't necessarily want all items to be instances of that class.
The text was updated successfully, but these errors were encountered:
acobster
pushed a commit
to sitecrafting/timber
that referenced
this issue
Apr 28, 2018
I'd like to be able to override how
MenuItem
instances are created. Right now,new $this->MenuItemClass($item)
is bound up insideMenu::order_children
. If it were in its own method, I could override that in order to, for instance, polymorphically create different kinds ofMenuItem
s:In this example,
LoginMenuItem
might return a different title/URL depending on the user's login state. But we don't necessarily want all items to be instances of that class.The text was updated successfully, but these errors were encountered: