1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-11-15 03:12:41 +01:00
phorge-phorge/src/applications/transactions/editfield/PhabricatorEpochEditField.php
epriestley bac6acb3d1 Make EditEngine form for Calendar Events almost fully-functional
Summary:
Ref T9275. This still has a number of rough edges and other minor problems (no JS on the controls, some date handling control bugs) but I'll smooth those over in future changes.

It does make all the editable transaction types available from EditEngine, technically speaking.

Test Plan: Created and edited events with the "pro" controller, which mostly worked.

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T9275

Differential Revision: https://secure.phabricator.com/D16281
2016-07-13 07:43:38 -07:00

33 lines
731 B
PHP

<?php
final class PhabricatorEpochEditField
extends PhabricatorEditField {
private $allowNull;
public function setAllowNull($allow_null) {
$this->allowNull = $allow_null;
return $this;
}
public function getAllowNull() {
return $this->allowNull;
}
protected function newControl() {
return id(new AphrontFormDateControl())
->setAllowNull($this->getAllowNull())
->setViewer($this->getViewer());
}
protected function newHTTPParameterType() {
return new AphrontEpochHTTPParameterType();
}
protected function newConduitParameterType() {
// TODO: This isn't correct, but we don't have any methods which use this
// yet.
return new ConduitIntParameterType();
}
}