Changeset View
Changeset View
Standalone View
Standalone View
src/applications/search/field/PhabricatorIDsSearchField.php
<?php | <?php | ||||
final class PhabricatorIDsSearchField | final class PhabricatorIDsSearchField | ||||
extends PhabricatorSearchField { | extends PhabricatorSearchField { | ||||
protected function getDefaultValue() { | protected function getDefaultValue() { | ||||
return array(); | return array(); | ||||
} | } | ||||
protected function getValueFromRequest(AphrontRequest $request, $key) { | protected function getValueFromRequest(AphrontRequest $request, $key) { | ||||
return $request->getStrList($key); | return $request->getStrList($key); | ||||
} | } | ||||
protected function newControl() { | protected function newControl() { | ||||
if (strlen($this->getValueForControl())) { | |||||
return new AphrontFormTextControl(); | return new AphrontFormTextControl(); | ||||
} else { | |||||
return null; | |||||
} | |||||
} | } | ||||
protected function getValueForControl() { | protected function getValueForControl() { | ||||
return implode(', ', parent::getValueForControl()); | return implode(', ', parent::getValueForControl()); | ||||
} | } | ||||
protected function newConduitParameterType() { | protected function newConduitParameterType() { | ||||
return id(new ConduitIntListParameterType()) | return id(new ConduitIntListParameterType()) | ||||
->setAllowEmptyList(false); | ->setAllowEmptyList(false); | ||||
} | } | ||||
} | } |