@recaptime-dev's working patches + fork for Phorge, a community fork of Phabricator. (Upstream dev and stable branches are at upstream/main and upstream/stable respectively.)
hq.recaptime.dev/wiki/Phorge
phorge
phabricator
1<?php
2
3final class ManiphestTaskHasSubtaskRelationship
4 extends ManiphestTaskRelationship {
5
6 const RELATIONSHIPKEY = 'task.has-subtask';
7
8 public function getEdgeConstant() {
9 return ManiphestTaskDependsOnTaskEdgeType::EDGECONST;
10 }
11
12 protected function getActionName() {
13 return pht('Edit Subtasks');
14 }
15
16 protected function getActionIcon() {
17 return 'fa-chevron-circle-down';
18 }
19
20 public function canRelateObjects($src, $dst) {
21 return ($dst instanceof ManiphestTask);
22 }
23
24 public function shouldAppearInActionMenu() {
25 return false;
26 }
27
28 public function getDialogTitleText() {
29 return pht('Edit Subtasks');
30 }
31
32 public function getDialogHeaderText() {
33 return pht('Current Subtasks');
34 }
35
36 public function getDialogButtonText() {
37 return pht('Save Subtasks');
38 }
39
40 protected function newRelationshipSource() {
41 return id(new ManiphestTaskRelationshipSource())
42 ->setSelectedFilter('open');
43 }
44
45}