Changeset View
Changeset View
Standalone View
Standalone View
src/applications/project/storage/PhabricatorProject.php
| Show First 20 Lines • Show All 579 Lines • ▼ Show 20 Lines | if ($this->isMilestone()) { | ||||
| '%s (%s)', | '%s (%s)', | ||||
| $this->getParentProject()->getName(), | $this->getParentProject()->getName(), | ||||
| $name); | $name); | ||||
| } | } | ||||
| return $name; | return $name; | ||||
| } | } | ||||
| public function getDisplayNameWithAncestorPath() { | |||||
| // Figure out the ancestors for this project | |||||
| // so that we can prepend that to the display name. | |||||
| $ancestors = mpull(array_reverse($this->getAncestorProjects()), 'getName'); | |||||
| $project_name_with_path = $this->getName(); | |||||
| if ($this->isMilestone()) { | |||||
| $project_name_with_path = pht( | |||||
| '%s (%s)', | |||||
sergey: Comment is a full sentence, starting with a capital and ending with a full stop. | |||||
| implode(' > ', $ancestors), | |||||
| $project_name_with_path); | |||||
| } else { | |||||
| $ancestors[] = $project_name_with_path; | |||||
| $project_name_with_path = implode(' > ', $ancestors); | |||||
| } | |||||
| // No pht usage, since we don't have translatable items. | |||||
| return $project_name_with_path; | |||||
| } | |||||
| public function getDisplayIconKey() { | public function getDisplayIconKey() { | ||||
| if ($this->isMilestone()) { | if ($this->isMilestone()) { | ||||
| $key = PhabricatorProjectIconSet::getMilestoneIconKey(); | $key = PhabricatorProjectIconSet::getMilestoneIconKey(); | ||||
| } else { | } else { | ||||
| $key = $this->getIcon(); | $key = $this->getIcon(); | ||||
| } | } | ||||
| return $key; | return $key; | ||||
| ▲ Show 20 Lines • Show All 321 Lines • Show Last 20 Lines | |||||
Comment is a full sentence, starting with a capital and ending with a full stop.