Differential D16327 Diff 39265 src/applications/transactions/editfield/PhabricatorEpochEditField.php
Changeset View
Changeset View
Standalone View
Standalone View
src/applications/transactions/editfield/PhabricatorEpochEditField.php
<?php | <?php | ||||
final class PhabricatorEpochEditField | final class PhabricatorEpochEditField | ||||
extends PhabricatorEditField { | extends PhabricatorEditField { | ||||
private $allowNull; | private $allowNull; | ||||
private $hideTime; | |||||
public function setAllowNull($allow_null) { | public function setAllowNull($allow_null) { | ||||
$this->allowNull = $allow_null; | $this->allowNull = $allow_null; | ||||
return $this; | return $this; | ||||
} | } | ||||
public function getAllowNull() { | public function getAllowNull() { | ||||
return $this->allowNull; | return $this->allowNull; | ||||
} | } | ||||
public function setHideTime($hide_time) { | |||||
$this->hideTime = $hide_time; | |||||
return $this; | |||||
} | |||||
public function getHideTime() { | |||||
return $this->hideTime; | |||||
} | |||||
protected function newControl() { | protected function newControl() { | ||||
return id(new AphrontFormDateControl()) | return id(new AphrontFormDateControl()) | ||||
->setAllowNull($this->getAllowNull()) | ->setAllowNull($this->getAllowNull()) | ||||
->setIsTimeDisabled($this->getHideTime()) | |||||
->setViewer($this->getViewer()); | ->setViewer($this->getViewer()); | ||||
} | } | ||||
protected function newHTTPParameterType() { | protected function newHTTPParameterType() { | ||||
return id(new AphrontEpochHTTPParameterType()) | return id(new AphrontEpochHTTPParameterType()) | ||||
->setAllowNull($this->getAllowNull()); | ->setAllowNull($this->getAllowNull()); | ||||
} | } | ||||
protected function newConduitParameterType() { | protected function newConduitParameterType() { | ||||
// TODO: This isn't correct, but we don't have any methods which use this | return new ConduitEpochParameterType(); | ||||
// yet. | |||||
return new ConduitIntParameterType(); | |||||
} | } | ||||
} | } |