mirror of
https://we.phorge.it/source/phorge.git
synced 2024-11-29 02:02:41 +01:00
31 lines
577 B
PHP
31 lines
577 B
PHP
|
<?php
|
||
|
|
||
|
final class PhabricatorSearchOrderField
|
||
|
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());
|
||
|
}
|
||
|
|
||
|
}
|