[ Index ] |
PHP Cross Reference of Phabricator |
[Summary view] [Print] [Text view]
1 <?php 2 3 final class DifferentialAuditorsField 4 extends DifferentialStoredCustomField { 5 6 public function getFieldKey() { 7 return 'phabricator:auditors'; 8 } 9 10 public function getFieldName() { 11 return pht('Auditors'); 12 } 13 14 public function getFieldDescription() { 15 return pht('Allows commits to trigger audits explicitly.'); 16 } 17 18 public function getValueForStorage() { 19 return json_encode($this->getValue()); 20 } 21 22 public function setValueFromStorage($value) { 23 try { 24 $this->setValue(phutil_json_decode($value)); 25 } catch (PhutilJSONParserException $ex) { 26 $this->setValue(array()); 27 } 28 return $this; 29 } 30 31 public function shouldAppearInCommitMessage() { 32 return true; 33 } 34 35 public function shouldAllowEditInCommitMessage() { 36 return true; 37 } 38 39 public function canDisableField() { 40 return false; 41 } 42 43 public function getRequiredHandlePHIDsForCommitMessage() { 44 return nonempty($this->getValue(), array()); 45 } 46 47 public function parseCommitMessageValue($value) { 48 return $this->parseObjectList( 49 $value, 50 array( 51 PhabricatorPeopleUserPHIDType::TYPECONST, 52 PhabricatorProjectProjectPHIDType::TYPECONST, 53 )); 54 } 55 56 public function renderCommitMessageValue(array $handles) { 57 return $this->renderObjectList($handles); 58 } 59 60 }
title
Description
Body
title
Description
Body
title
Description
Body
title
Body
Generated: Sun Nov 30 09:20:46 2014 | Cross-referenced by PHPXref 0.7.1 |