[ Index ] |
PHP Cross Reference of Phabricator |
[Summary view] [Print] [Text view]
1 <?php 2 3 final class ReleephBranchNamePreviewController 4 extends ReleephController { 5 6 public function processRequest() { 7 $request = $this->getRequest(); 8 9 $is_symbolic = $request->getBool('isSymbolic'); 10 $template = $request->getStr('template'); 11 12 if (!$is_symbolic && !$template) { 13 $template = ReleephBranchTemplate::getDefaultTemplate(); 14 } 15 16 $arc_project_id = $request->getInt('arcProjectID'); 17 $fake_commit_handle = 18 ReleephBranchTemplate::getFakeCommitHandleFor($arc_project_id); 19 20 list($name, $errors) = id(new ReleephBranchTemplate()) 21 ->setCommitHandle($fake_commit_handle) 22 ->setReleephProjectName($request->getStr('projectName')) 23 ->setSymbolic($is_symbolic) 24 ->interpolate($template); 25 26 $markup = ''; 27 28 if ($name) { 29 $markup = phutil_tag( 30 'div', 31 array('class' => 'name'), 32 $name); 33 } 34 35 if ($errors) { 36 $markup .= phutil_tag( 37 'div', 38 array('class' => 'error'), 39 head($errors)); 40 } 41 42 return id(new AphrontAjaxResponse()) 43 ->setContent(array('markup' => $markup)); 44 } 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 |