Differential D17372 Diff 41774 src/applications/search/menuitem/PhabricatorEditEngineProfileMenuItem.php
Changeset View
Changeset View
Standalone View
Standalone View
src/applications/search/menuitem/PhabricatorEditEngineProfileMenuItem.php
| Show First 20 Lines • Show All 100 Lines • ▼ Show 20 Lines | final class PhabricatorEditEngineProfileMenuItem | ||||
| protected function newNavigationMenuItems( | protected function newNavigationMenuItems( | ||||
| PhabricatorProfileMenuItemConfiguration $config) { | PhabricatorProfileMenuItemConfiguration $config) { | ||||
| $form = $this->getForm(); | $form = $this->getForm(); | ||||
| if (!$form) { | if (!$form) { | ||||
| return array(); | return array(); | ||||
| } | } | ||||
| $engine = $form->getEngine(); | |||||
| $form_key = $form->getIdentifier(); | |||||
| $icon = $form->getIcon(); | $icon = $form->getIcon(); | ||||
| $name = $this->getDisplayName($config); | $name = $this->getDisplayName($config); | ||||
| $href = $engine->getEditURI(null, "form/{$form_key}/"); | |||||
| $href = $form->getCreateURI(); | |||||
| if ($href === null) { | |||||
| return array(); | |||||
| } | |||||
| $item = $this->newItem() | $item = $this->newItem() | ||||
| ->setHref($href) | ->setHref($href) | ||||
| ->setName($name) | ->setName($name) | ||||
| ->setIcon($icon); | ->setIcon($icon); | ||||
| return array( | return array( | ||||
| $item, | $item, | ||||
| ▲ Show 20 Lines • Show All 53 Lines • Show Last 20 Lines | |||||