forked from phacility/phabricator
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
48 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
45 changes: 45 additions & 0 deletions
45
src/applications/maniphest/relationship/ManiphestTaskHasBlockerRelationship.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
<?php | ||
|
||
final class ManiphestTaskHasBlockerRelationship | ||
extends ManiphestTaskRelationship { | ||
|
||
const RELATIONSHIPKEY = 'task.has-blocker'; | ||
|
||
public function getEdgeConstant() { | ||
return ManiphestTaskBlockerEdgeType::EDGECONST; | ||
} | ||
|
||
protected function getActionName() { | ||
return pht('Edit Blockers'); | ||
} | ||
|
||
protected function getActionIcon() { | ||
return 'fa-chevron-circle-down'; | ||
} | ||
|
||
public function canRelateObjects($src, $dst) { | ||
return ($dst instanceof ManiphestTask); | ||
} | ||
|
||
public function shouldAppearInActionMenu() { | ||
return false; | ||
} | ||
|
||
public function getDialogTitleText() { | ||
return pht('Edit Blockers'); | ||
} | ||
|
||
public function getDialogHeaderText() { | ||
return pht('Current Blockers'); | ||
} | ||
|
||
public function getDialogButtonText() { | ||
return pht('Save Blockers'); | ||
} | ||
|
||
protected function newRelationshipSource() { | ||
return id(new ManiphestTaskRelationshipSource()) | ||
->setSelectedFilter('open'); | ||
} | ||
|
||
} |