[ Index ] |
PHP Cross Reference of Phabricator |
[Summary view] [Print] [Text view]
1 <?php 2 3 final class PonderAddAnswerView extends AphrontView { 4 5 private $question; 6 private $actionURI; 7 private $draft; 8 9 public function setQuestion($question) { 10 $this->question = $question; 11 return $this; 12 } 13 14 public function setActionURI($uri) { 15 $this->actionURI = $uri; 16 return $this; 17 } 18 19 public function render() { 20 $question = $this->question; 21 22 $header = id(new PHUIHeaderView()) 23 ->setHeader(pht('Add Answer')); 24 25 $form = new AphrontFormView(); 26 $form 27 ->setUser($this->user) 28 ->setAction($this->actionURI) 29 ->setWorkflow(true) 30 ->addHiddenInput('question_id', $question->getID()) 31 ->appendChild( 32 id(new PhabricatorRemarkupControl()) 33 ->setName('answer') 34 ->setLabel(pht('Answer')) 35 ->setError(true) 36 ->setID('answer-content') 37 ->setUser($this->user)) 38 ->appendChild( 39 id(new AphrontFormSubmitControl()) 40 ->setValue(pht('Add Answer'))); 41 42 return id(new PHUIObjectBoxView()) 43 ->setHeader($header) 44 ->appendChild($form); 45 } 46 }
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 |