1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2025-01-07 21:31:02 +01:00
phorge-phorge/src/applications/diffusion/relationships/DiffusionCommitHasTaskRelationship.php
epriestley dc9283b85d Convert all standard relationship-editing actions to modern Relationships code
Summary: Ref T4788. This moves everything except "merge" to the new code.

Test Plan:
  - Edited relationships in Differential, Diffusion, and Pholio.
  - Uninstalled Pholio, made sure "Edit Mocks..." actions vanished.

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T4788

Differential Revision: https://secure.phabricator.com/D16193
2016-06-29 11:24:52 -07:00

40 lines
831 B
PHP

<?php
final class DiffusionCommitHasTaskRelationship
extends DiffusionCommitRelationship {
const RELATIONSHIPKEY = 'commit.has-task';
public function getEdgeConstant() {
return DiffusionCommitHasTaskEdgeType::EDGECONST;
}
protected function getActionName() {
return pht('Edit Tasks');
}
protected function getActionIcon() {
return 'fa-anchor';
}
public function canRelateObjects($src, $dst) {
return ($dst instanceof ManiphestTask);
}
public function getDialogTitleText() {
return pht('Edit Related Tasks');
}
public function getDialogHeaderText() {
return pht('Current Tasks');
}
public function getDialogButtonText() {
return pht('Save Related Tasks');
}
protected function newRelationshipSource() {
return new ManiphestTaskRelationshipSource();
}
}