[ Index ] |
PHP Cross Reference of Phabricator |
[Summary view] [Print] [Text view]
1 <?php 2 3 final class PhabricatorDashboardPanelSearchApplicationCustomField 4 extends PhabricatorStandardCustomField { 5 6 public function getFieldType() { 7 return 'search.application'; 8 } 9 10 public function shouldAppearInApplicationSearch() { 11 return false; 12 } 13 14 public function renderEditControl(array $handles) { 15 16 $engines = id(new PhutilSymbolLoader()) 17 ->setAncestorClass('PhabricatorApplicationSearchEngine') 18 ->loadObjects(); 19 20 $options = array(); 21 22 $value = $this->getFieldValue(); 23 if (strlen($value) && empty($engines[$value])) { 24 $options[$value] = $value; 25 } 26 27 $engines = msort($engines, 'getResultTypeDescription'); 28 foreach ($engines as $class_name => $engine) { 29 $options[$class_name] = $engine->getResultTypeDescription(); 30 } 31 32 return id(new AphrontFormSelectControl()) 33 ->setID($this->getFieldControlID()) 34 ->setLabel($this->getFieldName()) 35 ->setCaption($this->getCaption()) 36 ->setName($this->getFieldKey()) 37 ->setValue($this->getFieldValue()) 38 ->setOptions($options); 39 } 40 41 }
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 |