3 final class ReleephReasonFieldSpecification
4 extends ReleephFieldSpecification
{
6 public function getFieldKey() {
10 public function getName() {
14 public function getStorageKey() {
18 public function getStyleForPropertyView() {
22 public function getIconForPropertyView() {
23 return PHUIPropertyListView
::ICON_SUMMARY
;
26 public function renderPropertyViewValue(array $handles) {
30 'class' => 'phabricator-remarkup',
32 $this->getMarkupEngineOutput());
35 private $error = true;
37 public function renderEditControl(array $handles) {
38 return id(new AphrontFormTextAreaControl())
39 ->setLabel(pht('Reason'))
41 ->setError($this->error
)
42 ->setValue($this->getValue());
45 public function validate($reason) {
47 $this->error
= pht('Required');
48 throw new ReleephFieldParseException(
50 pht('You must give a reason for your request.'));
54 public function renderHelpForArcanist() {
56 'Fully explain why you are requesting this code be included '.
57 'in the next release.')."\n";
58 return phutil_console_wrap($text, 8);
61 public function shouldAppearOnCommitMessage() {
65 public function renderLabelForCommitMessage() {
66 return pht('Request Reason');
69 public function renderValueForCommitMessage() {
70 return $this->getValue();
73 public function shouldMarkup() {
77 public function getMarkupText($field) {
78 $reason = $this->getValue();