mirror of
https://we.phorge.it/source/phorge.git
synced 2024-11-16 20:02:40 +01:00
31 lines
578 B
PHP
31 lines
578 B
PHP
|
<?php
|
||
|
|
||
|
final class PhabricatorSearchSelectField
|
||
|
extends PhabricatorSearchField {
|
||
|
|
||
|
private $options;
|
||
|
|
||
|
public function setOptions(array $options) {
|
||
|
$this->options = $options;
|
||
|
return $this;
|
||
|
}
|
||
|
|
||
|
public function getOptions() {
|
||
|
return $this->options;
|
||
|
}
|
||
|
|
||
|
protected function getDefaultValue() {
|
||
|
return null;
|
||
|
}
|
||
|
|
||
|
protected function getValueFromRequest(AphrontRequest $request, $key) {
|
||
|
return $request->getStr($key);
|
||
|
}
|
||
|
|
||
|
protected function newControl() {
|
||
|
return id(new AphrontFormSelectControl())
|
||
|
->setOptions($this->getOptions());
|
||
|
}
|
||
|
|
||
|
}
|