2016-04-07 20:06:26 +02:00
|
|
|
<?php
|
|
|
|
|
|
|
|
final class PhabricatorEpochEditField
|
|
|
|
extends PhabricatorEditField {
|
|
|
|
|
2016-07-12 19:04:05 +02:00
|
|
|
private $allowNull;
|
2016-07-26 20:20:09 +02:00
|
|
|
private $hideTime;
|
2016-07-12 19:04:05 +02:00
|
|
|
|
|
|
|
public function setAllowNull($allow_null) {
|
|
|
|
$this->allowNull = $allow_null;
|
|
|
|
return $this;
|
|
|
|
}
|
|
|
|
|
|
|
|
public function getAllowNull() {
|
|
|
|
return $this->allowNull;
|
|
|
|
}
|
|
|
|
|
2016-07-26 20:20:09 +02:00
|
|
|
public function setHideTime($hide_time) {
|
|
|
|
$this->hideTime = $hide_time;
|
|
|
|
return $this;
|
|
|
|
}
|
|
|
|
|
|
|
|
public function getHideTime() {
|
|
|
|
return $this->hideTime;
|
|
|
|
}
|
|
|
|
|
2016-04-07 20:06:26 +02:00
|
|
|
protected function newControl() {
|
|
|
|
return id(new AphrontFormDateControl())
|
2016-07-12 19:04:05 +02:00
|
|
|
->setAllowNull($this->getAllowNull())
|
2016-07-26 20:20:09 +02:00
|
|
|
->setIsTimeDisabled($this->getHideTime())
|
2016-04-07 20:06:26 +02:00
|
|
|
->setViewer($this->getViewer());
|
|
|
|
}
|
|
|
|
|
|
|
|
protected function newHTTPParameterType() {
|
2016-07-12 20:58:56 +02:00
|
|
|
return id(new AphrontEpochHTTPParameterType())
|
|
|
|
->setAllowNull($this->getAllowNull());
|
2016-04-07 20:06:26 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
protected function newConduitParameterType() {
|
2016-07-26 20:20:09 +02:00
|
|
|
return new ConduitEpochParameterType();
|
2016-04-07 20:06:26 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
}
|