Correct a parameter order swap in "diffusion.historyquery" for Mercurial
[phabricator.git] / src / applications / releeph / field / specification / ReleephRequestorFieldSpecification.php
blobd479bb8020489bd2dd61e97d627df8c2fb973b48
1 <?php
3 final class ReleephRequestorFieldSpecification
4 extends ReleephFieldSpecification {
6 public function getFieldKey() {
7 return 'requestor';
10 public function getName() {
11 return pht('Requestor');
14 public function getRequiredHandlePHIDsForPropertyView() {
15 $phids = array();
17 $phid = $this->getReleephRequest()->getRequestUserPHID();
18 if ($phid) {
19 $phids[] = $phid;
22 return $phids;
25 public function renderPropertyViewValue(array $handles) {
26 return $this->renderHandleList($handles);
29 public function shouldAppearOnCommitMessage() {
30 return true;
33 public function shouldAppearOnRevertMessage() {
34 return true;
37 public function renderLabelForCommitMessage() {
38 return pht('Requested By');
41 public function renderValueForCommitMessage() {
42 $phid = $this->getReleephRequest()->getRequestUserPHID();
43 $handle = id(new PhabricatorHandleQuery())
44 ->setViewer($this->getUser())
45 ->withPHIDs(array($phid))
46 ->executeOne();
47 return $handle->getName();