mirror of
https://we.phorge.it/source/phorge.git
synced 2024-11-16 11:52:40 +01:00
36e2d02d6e
Summary: `pht`ize a whole bunch of strings in rP. Test Plan: Intense eyeballing. Reviewers: #blessed_reviewers, epriestley Reviewed By: #blessed_reviewers, epriestley Subscribers: hach-que, Korvin, epriestley Differential Revision: https://secure.phabricator.com/D12797
63 lines
1.4 KiB
PHP
63 lines
1.4 KiB
PHP
<?php
|
|
|
|
final class DifferentialDependsOnField
|
|
extends DifferentialCustomField {
|
|
|
|
public function getFieldKey() {
|
|
return 'differential:depends-on';
|
|
}
|
|
|
|
public function getFieldKeyForConduit() {
|
|
return 'phabricator:depends-on';
|
|
}
|
|
|
|
public function getFieldName() {
|
|
return pht('Depends On');
|
|
}
|
|
|
|
public function canDisableField() {
|
|
return false;
|
|
}
|
|
|
|
public function getFieldDescription() {
|
|
return pht('Lists revisions this one depends on.');
|
|
}
|
|
|
|
public function shouldAppearInPropertyView() {
|
|
return true;
|
|
}
|
|
|
|
public function renderPropertyViewLabel() {
|
|
return $this->getFieldName();
|
|
}
|
|
|
|
public function getRequiredHandlePHIDsForPropertyView() {
|
|
return PhabricatorEdgeQuery::loadDestinationPHIDs(
|
|
$this->getObject()->getPHID(),
|
|
DifferentialRevisionDependsOnRevisionEdgeType::EDGECONST);
|
|
}
|
|
|
|
public function renderPropertyViewValue(array $handles) {
|
|
return $this->renderHandleList($handles);
|
|
}
|
|
|
|
public function getProTips() {
|
|
return array(
|
|
pht(
|
|
'Create a dependency between revisions by writing '.
|
|
'"%s" in your summary.',
|
|
'Depends on D123'),
|
|
);
|
|
}
|
|
|
|
public function shouldAppearInConduitDictionary() {
|
|
return true;
|
|
}
|
|
|
|
public function getConduitDictionaryValue() {
|
|
return PhabricatorEdgeQuery::loadDestinationPHIDs(
|
|
$this->getObject()->getPHID(),
|
|
DifferentialRevisionDependsOnRevisionEdgeType::EDGECONST);
|
|
}
|
|
|
|
}
|