Differential D17236 Diff 41453 src/applications/search/menuitem/PhabricatorProjectProfileMenuItem.php
Changeset View
Changeset View
Standalone View
Standalone View
src/applications/search/menuitem/PhabricatorProjectProfileMenuItem.php
Show First 20 Lines • Show All 66 Lines • ▼ Show 20 Lines | public function getDisplayName( | ||||
} else { | } else { | ||||
return $project->getName(); | return $project->getName(); | ||||
} | } | ||||
} | } | ||||
public function buildEditEngineFields( | public function buildEditEngineFields( | ||||
PhabricatorProfileMenuItemConfiguration $config) { | PhabricatorProfileMenuItemConfiguration $config) { | ||||
return array( | return array( | ||||
id(new PhabricatorTextEditField()) | |||||
->setKey('name') | |||||
->setLabel(pht('Name')) | |||||
->setValue($this->getName($config)), | |||||
id(new PhabricatorDatasourceEditField()) | id(new PhabricatorDatasourceEditField()) | ||||
->setKey(self::FIELD_PROJECT) | ->setKey(self::FIELD_PROJECT) | ||||
->setLabel(pht('Project')) | ->setLabel(pht('Project')) | ||||
->setIsRequired(true) | ->setIsRequired(true) | ||||
->setDatasource(new PhabricatorProjectDatasource()) | ->setDatasource(new PhabricatorProjectDatasource()) | ||||
->setSingleValue($config->getMenuItemProperty('project')), | ->setSingleValue($config->getMenuItemProperty('project')), | ||||
id(new PhabricatorTextEditField()) | |||||
->setKey('name') | |||||
->setLabel(pht('Name')) | |||||
->setValue($this->getName($config)), | |||||
); | ); | ||||
} | } | ||||
private function getName( | private function getName( | ||||
PhabricatorProfileMenuItemConfiguration $config) { | PhabricatorProfileMenuItemConfiguration $config) { | ||||
return $config->getMenuItemProperty('name'); | return $config->getMenuItemProperty('name'); | ||||
} | } | ||||
▲ Show 20 Lines • Show All 68 Lines • Show Last 20 Lines |