mirror of
https://we.phorge.it/source/phorge.git
synced 2024-11-15 03:12:41 +01:00
08de131da5
Summary: Ref T10077. Ref T8918. The way the main menu is built is not very modular and fairly hacky. It assumes menus are provided by applications, but this isn't exactly true. Notably, the "Quick Create" menu is not per-application. The current method of building this menu is very inefficient (see T10077). Particularly, we have to build it //twice// because we need to build it once to render the item and then again to render the dropdown options. Start cleaning this up. This diff doesn't actually have any behavioral changes, since I can't swap the menu over until we get rid of all the other items and I haven't extended this to Notifications/Conpherence yet so it doesn't actually fix T8918. Test Plan: Viewed menus while logged in, logged out, in different applications, in desktop/mobile. Nothing appeared different. Reviewers: chad Reviewed By: chad Maniphest Tasks: T8918, T10077 Differential Revision: https://secure.phabricator.com/D14922
31 lines
545 B
PHP
31 lines
545 B
PHP
<?php
|
|
|
|
final class PHUIMainMenuView extends AphrontView {
|
|
|
|
private $menuItem;
|
|
private $extraContent = array();
|
|
private $order;
|
|
|
|
public function setMenuBarItem(PHUIListItemView $menu_item) {
|
|
$this->menuItem = $menu_item;
|
|
return $this;
|
|
}
|
|
|
|
public function getMenuBarItem() {
|
|
return $this->menuItem;
|
|
}
|
|
|
|
public function setOrder($order) {
|
|
$this->order = $order;
|
|
return $this;
|
|
}
|
|
|
|
public function getOrder() {
|
|
return $this->order;
|
|
}
|
|
|
|
public function render() {
|
|
return $this->renderChildren();
|
|
}
|
|
|
|
}
|