1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2025-03-03 07:59:15 +01:00
phorge-phorge/src/applications/transactions/editfield/PhabricatorSpaceEditField.php
epriestley 9fd8343704 Bring Duo MFA upstream
Summary: Depends on D20038. Ref T13231. Although I planned to keep this out of the upstream (see T13229) it ended up having enough pieces that I imagine it may need more fixes/updates than we can reasonably manage by copy/pasting stuff around. Until T5055, we don't really have good tools for managing this. Make my life easier by just upstreaming this.

Test Plan: See T13231 for a bunch of workflow discussion.

Reviewers: amckinley

Reviewed By: amckinley

Maniphest Tasks: T13231

Differential Revision: https://secure.phabricator.com/D20039
2019-01-28 18:26:45 -08:00

39 lines
940 B
PHP

<?php
final class PhabricatorSpaceEditField
extends PhabricatorEditField {
private $policyField;
public function setPolicyField(PhabricatorPolicyEditField $policy_field) {
$this->policyField = $policy_field;
return $this;
}
public function getPolicyField() {
return $this->policyField;
}
protected function newControl() {
// NOTE: This field doesn't do anything on its own, it just serves as a
// companion to the associated View Policy field.
return null;
}
protected function newHTTPParameterType() {
return new AphrontPHIDHTTPParameterType();
}
protected function newConduitParameterType() {
return new ConduitPHIDParameterType();
}
public function shouldReadValueFromRequest() {
return $this->getPolicyField()->shouldReadValueFromRequest();
}
public function shouldReadValueFromSubmit() {
return $this->getPolicyField()->shouldReadValueFromSubmit();
}
}