3 final class PhabricatorSearchDateControlField
4 extends PhabricatorSearchField
{
6 protected function getValueExistsInRequest(AphrontRequest
$request, $key) {
7 // The control doesn't actually submit a value with the same name as the
8 // key, so look for the "_d" value instead, which has the date part of the
10 return $request->getExists($key.'_d');
13 protected function getValueFromRequest(AphrontRequest
$request, $key) {
14 $value = AphrontFormDateControlValue
::newFromRequest($request, $key);
15 $value->setOptional(true);
16 return $value->getDictionary();
19 protected function newControl() {
20 return id(new AphrontFormDateControl())
24 protected function didReadValueFromSavedQuery($value) {
29 if ($value instanceof AphrontFormDateControlValue
&& $value->getEpoch()) {
30 return $value->setOptional(true);
33 $value = AphrontFormDateControlValue
::newFromWild(
36 return $value->setOptional(true);