3 final class PhabricatorSearchCustomFieldProxyField
4 extends PhabricatorSearchField
{
9 public function setSearchEngine(PhabricatorApplicationSearchEngine
$engine) {
10 $this->searchEngine
= $engine;
14 public function getSearchEngine() {
15 return $this->searchEngine
;
18 public function setCustomField(PhabricatorCustomField
$field) {
19 $this->customField
= $field;
20 $this->setKey('custom:'.$field->getFieldIndex());
23 $aliases[] = $field->getFieldKey();
24 $this->setAliases($aliases);
29 public function getLabel() {
30 return $this->getCustomField()->getFieldName();
33 public function getCustomField() {
34 return $this->customField
;
37 protected function getDefaultValue() {
41 public function getConduitKey() {
42 return $this->getCustomField()->getModernFieldKey();
45 protected function getValueExistsInRequest(AphrontRequest
$request, $key) {
46 // TODO: For historical reasons, the keys we look for don't line up with
47 // the keys that CustomFields use. Just skip the check for existence and
48 // always read the value. It would be vaguely nice to make rendering more
49 // consistent instead.
53 protected function getValueFromRequest(AphrontRequest
$request, $key) {
54 return $this->getCustomField()->readApplicationSearchValueFromRequest(
55 $this->getSearchEngine(),
59 public function appendToForm(AphrontFormView
$form) {
60 return $this->getCustomField()->appendToApplicationSearchForm(
61 $this->getSearchEngine(),
66 public function getDescription() {
67 return $this->getCustomField()->getFieldDescription();
70 protected function newConduitParameterType() {
71 return $this->getCustomField()->getConduitSearchParameterType();